I have this code in my .js file
CKEDITOR.editorConfig = function( config ) {config.toolbar = 'Custom'; config.toolbar_Custom = [ { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, '/', { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv', '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }, '/', { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] } ]; }; $(document).ready(function(){ CKEDITOR.replace( 'editor1', { toolbar : 'Custom' }); });
I got the code above from the toolbar guide (http://docs.cksource.com/CKEditor_3.x/D ... de/Toolbar).
When I try to load my page, I get this error:
TypeError: x is undefined http://myhost.com/mywebapp/javascripts/ckeditor/ckeditor.js Line 96
There seemed to be nothing wrong with the .js file syntax. But obviously, ckeditor doesn't like it.
I searched the net but nothing useful came up.
Can you please help?
Thanks
Re: editor not showing
Set up correct
CKEDITOR.config.toolbar = 'Custom';
after you have defined it in your case.
WBR, Oleg.
Hi, I found a solution. There
Hi, I found a solution. There is a problem with the html title tag.
In fact :
- title tag within body produce this problem
- title tag with a body containing property produce this problem too
The best solution i found is to delete the title section.
I know it's not the best, but it's a solution :)
function removeTitle(content) {
var findex = content.indexOf("<title>");
var lindex = content.indexOf("</title>");
var contentFormat;
if (findex != -1 && lindex != -1 && findex < lindex) {
contentFormat = content.substring(0, findex) + content.substring(lindex + 8);
return contentFormat;
} else {
return content;
}
}