Kód:
...
<script>
tinyMCE.init({
mode : 'textareas',
theme : 'advanced',
skin : 'o2k7',
language : 'hu',
plugins : 'pagebreak,table,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,advlist',
theme_advanced_buttons1 : 'save,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect',
theme_advanced_buttons2 : 'cut,copy,paste|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor',
theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr',
theme_advanced_toolbar_location : 'top',
theme_advanced_toolbar_align : 'left',
// theme_advanced_statusbar_location : 'bottom',
theme_advanced_resizing : false,
entities : '',
content_css : 'css/content.css'
});
</script>
...
és form: Kód:
...
$.fn.submitForm=function(){
$("#tartalom").delegate("form", "submit", function(){
var link=$(this).attr("action");
var method=$(this).attr("method");
var enc=$(this).attr("enctype");
method=(method)?method:"POST";
$.ajax({
type:method,
url:link,
data:$(this).serialize(),
beforeSend: function(d,s){
$(".loading").fadeIn("slow", function(){
$(".loading").css("display","block");
});
},
success:function(html){
$("#tartalom").html(html);
},
error:function(XMLHttpRequest,textStatus,errorThrown){
$("#tartalom").load("lib/error.php");
return false;
},
complete: function(d,s){
$(".loading").fadeOut("slow", function(){
$(".loading").css("display","none");
});
}
});
return false;
});
...
Könyvjelzők