Closed pr0thean closed 5 years ago
same issue..
hi guys in node_modules/react-ckeditor-componnet/lib/ckeditor.js change line : var defaultScriptUrl = 'https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js'; to var defaultScriptUrl = 'https://cdn.ckeditor.com/4.6.2/full/ckeditor.js'; good lock,
Hey,
If the issue is solved using isaac's method, then you can simply pass the full script url as prop using scriptUrl
prop present in the library. Because directly changing the node_modules build files won't help as the files will reset when you update/reinstall the library.
So you can directly use this code:
<CKEditor scriptUrl="https://cdn.ckeditor.com/4.6.2/full/ckeditor.js" />
I have only standard version of toolbar. I tried to add full set of options like this:
<CKEditor content={props.content} events={{ "change": props.onChangeEditor }} config={{ toolbar: [ { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] }, { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, '/', { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] }, { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] }, { 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' ] }, { name: 'about', items: [ 'About' ] } ], }} />
But this does not change anything. HoweverremoveButtons
work fine. I can remove options from toolbar but I can't add any.