javascript - Problems transforming toolbar on CKEditor -
this code display ckeditor4:
<script type="text/javascript"> ckeditor.replace( 'description', { toolbar: 'basic' }); </script>
this works fine , gives following options:
bold, italic, ordered list, unordered list, indent, outdent, link, unlink, ckeeditor
my question is, without linking external config file, , using code above, how can make have following options:
bold, italic, unordered list, ordered list
this code tried broke editor (it didn't display):
<script type="text/javascript"> ckeditor.replace( 'description', { toolbar = [ { name: 'basicstyles', items: [ 'bold', 'italic' ] } { name: 'paragraph', groups: [ 'list'] }, ]; }); </script>
can show me have gone wrong please?
you're missed semicolon between objects in array.
you can remove unnecessary buttons .removebuttons
property:
config.removebuttons = 'underline,justifycenter';
use:
ckeditor.replace( 'description', { toolbar: 'basic', removebuttons: 'bold' });
Comments
Post a Comment