I download CKEditor 4.1.2 full version. I am trying to create a custom toolbar but any changes I make in config.js are not reflected when I refresh my browser.
CKEDITOR.editorConfig = function( config ) { config.uiColor = '#FFDC6E'; config.skin = 'v2'; config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar =[ { name: 'document', items : [ 'Source','NewPage','Preview' ] }, { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] }, '/', { name: 'styles', items : [ 'Styles','Format' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] }, { name: 'insert', items :[ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'tools', items : [ 'Maximize','-','About' ] } ]; };
I have cleared my browser cache after applying the changes. But it is still not reflected.
If I set these code up in html file :
<textarea name="content" class="ckeditor" id="content" cols="50" rows="20"></textarea> <script type="text/javascript"><!-- CKEDITOR.replace( 'content', { toolbar: 'MyToolbar', uiColor: '#FFDC6E', }); //--></script>
Only the color changes.
If I set these code in html file :
<textarea name="content" class="ckeditor" id="content" cols="50" rows="20"></textarea> <script type="text/javascript"><!-- CKEDITOR.replace( 'content', { toolbar: [{ name: 'document', items : [ 'Source','NewPage','Preview' ] }, { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] }, '/', { name: 'styles', items : [ 'Styles','Format' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] }, { name: 'insert', items :[ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'tools', items : [ 'Maximize','-','About' ] } ], uiColor: '#FFDC6E', }); //--></script>
It is work. Both color and toolbar is changed.
I did this. Added the
I did this. Added the following code to config.js:
Then in the html page with the editor instance, changed the first part of <textarea> to this:
Then added this right after </textarea>:
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Thanks sebstefanov,
Thanks sebstefanov,
I tried many times, now I have the results.
config.js
HTML
I tested in IE8, I join the editor to my scripts and templates.
I found that IE8 will not be immediately reflected.
Even if I delete temporary files and reload page.
I need close the tab and open new tab, then it will be reflected.
But if I use static html page, it will be reflected when reload.
In google chrome, no this problem.
Now, You can set many toolbar up to config.sys, and set one toolbar as default.
If you have congif default toolbar.
HTML
If you want use other toolbar which config in config.sys.
HTML
That's all.
I've tried your examples
I've tried your examples above, but I can only get certain items displayed... for example, the colors item is never displayed (textColor and BGColor), and nether are the styles (Styles, Format, Font, FontSize)
(both on IE and Chrome)
any idea why?
Do you have the plugins
Do you have the plugins installed? CKEditor doesn't come with all the plugins installed by default (though styles, format is included in the Standard package).
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Thanks for your suggestion.
Thanks for your suggestion.
In fact it turned out to be that I was using the standard package instead of the full package (and your mention of the standard packed prompted me to think of this)
nice,
I have the same problem, now resolved