$(document).ready(function() { CKEDITOR.disableAutoInline = true; CKFinder.setupCKEditor( null, '/ckfinder/' ); $("div[contenteditable='true'], h1[contenteditable='true']" ).each(function( index ) { var content_id = $(this).attr("id"); //alert(content_id); CKEDITOR.inline( content_id, { language: 'cs', entities: false, htmlEncodeOutput: false, entities_greek: false, entities_latin: false, toolbarGroups: [ { name: 'document', groups: [ 'print','preview','doctools','templates' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ] }, { name: 'tools', groups: ['mode','maximize'] }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'links' }, { name: 'insert' }, { name: 'styles' } ], removePlugins: 'save,font,newpage,placeholder,docprops,bidi', extraPlugins: 'sourcedialog', baseUrl: '/domains/0001/"userfiles/', on: { blur: function( event ) { //alert("x"); var content = event.editor.getData(); $.post("content.update",{content : content, id : content_id},function(data){ if(data.error) { alert(data.error); } }, "json" ); } } } ); }); });