Closed msliman closed 8 years ago
mind sharing the code¿
@tonydspaniard , its when you use the CKEditorInline
widget with the basic code given in the example on the github page,
<?php CKEditorInline::begin(['preset' => 'basic']);?>
This text can be edited now :)
<?php CKEditorInline::end();?>
also, it loads the jquery from the adapter/jquery.js
and adds a dependency on yii\web\JqueryAsset
too which results in adding 2 jquery files.
For fixing it create your widget copy which extends from CKEditorInline and implement protected function registerPlugin() in which copy code of registerPlugin function but replace row $js[] = "CKEDITOR.inline('$id', $options);";
by this code: $js[] = <<<JS if (CKEDITOR.instances['$id']) { CKEDITOR.instances['$id'].destroy(true); } CKEDITOR.inline('$id', $options); JS;
CKEDITOR.instances['$id'].destroy will show notifications in console "Error code: editor-incorrect-destroy." because the editor is being destroyed before it is fully initialized. But widget will work correctly
I had this problem appeared in console.