2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 112 forks source link

How to get more plugins to work? #100

Closed logofakt closed 7 years ago

logofakt commented 7 years ago

Just played around with other extensions like autolink or autoembed. I did it exactly in the way you showed for pbckcode (which works for me!).

<?php $this->registerJs("CKEDITOR.plugins.addExternal('pbckcode', '/pbckcode/plugin.js', '');"); ?>
<?php $this->registerJs("CKEDITOR.plugins.addExternal('autolink', '/autolink/plugin.js', '');"); ?>
...
'extraPlugins' => ['pbckcode', 'autolink'],
...
['name' => 'pbckcode'], // <--- OUR NEW PLUGIN YAY!

With this configuration the editbox will not render.

If I comment out all of pbckcode only having autolink I can't paste any text into the editbox. Could it be that other plugins do not work? Or did I misconfig something?

s4pphir3 commented 7 years ago

Not sure if you still need it but it might help someone in future. You need to use config string as described here: CKEditor Documentation. In your case: 'extraPlugins' => 'pbckcode,autolink',

tonydspaniard commented 7 years ago

Thank you @s4pphir3