javascript - Unable to add enable the scayt in toolbar in CKEditor -
my config.js
follow
ckeditor.editorconfig = function( config ) { // define changes default configuration here. // complete reference see: // http://docs.ckeditor.com/#!/api/ckeditor.config config.height='10em'; // toolbar groups arrangement, optimized single toolbar row. config.toolbargroups = [ { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'forms' }, { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, /*{ name: 'links' },*/ { name: 'insert' }, { name: 'styles' }, { name: 'colors' }, { name: 'tools' }, { name: 'others' } /*{ name: 'about' }*/ ]; config.entermode = ckeditor.enter_br; // default plugins included in basic setup define buttons // not needed in basic editor. removed here. config.removebuttons = 'cut,copy,paste,undo,redo,anchor,underline,strike,subscript,superscript'; // dialog windows simplified. config.removedialogtabs = 'link:advanced'; config.extraplugins = 'scayt'; };
by adding config.extraplugins = 'scayt';
ckeditor
getting disabled put scayt folder in plugins folder of ckeditor. please if know wrong did. want add spell checker in ckeditor.
try adding this:
config.scayt_autostartup = true;
i didn't define:
config.extraplugins = 'scayt';
and working
edit
you can try initiating in javascript here: http://jsfiddle.net/ddan/usz40fb5/
var editor; function createeditor( lang ) { editor && editor.destroy(); editor = ckeditor.replace( 'editor', { plugins: 'wysiwygarea,sourcearea,basicstyles,toolbar,scayt', // turn on scayt automatically scayt_autostartup: true, language: lang, } ); } createeditor( 'en' );
edit
based on comment:
this 1 must work. using version 4.4.3. example give using cdn ckeditor. if want replace local js feel free include own script or download script , load in local library.
<!-- ckeditor 4.4.3 --> <script src="http://cdn.ckeditor.com/4.4.3/standard/ckeditor.js"></script> <textarea id="editor"> worng spelling</textarea> <script> // shorthand $( document ).ready() $(function() { ckeditor.replace( 'editor', { scayt_autostartup: true }); }); </script>
see working example: http://jsfiddle.net/ddan/ks3p4/8/
Comments
Post a Comment