I followed the steps on the CDN Guidelines page for CKEditior, but I can't make it work. The plugin that I'm trying to install is "autoembed" (or any plugin that lets me insert a video from YouTube, a Tweet and all of those different content types), but even when I tried different ways, I can't get it to work.
I was also reading the documentation on using a custom config file, where apparently they let you create a custom config config.js
file, but it too doesn't work, or I'm not qualified to make it work.
CKEditor 4 comes with a rich set of configuration options that make it possible to customize its appearance, features, and behavior. The main configuration file is named config. js . This file can be found in the root of the CKEditor 4 installation folder.
There's a method in CKEDITOR.resourceManager
called addExternal
. You can use it like
// Loads a plugin from '/myplugin/samples/plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
Then simply add autoembed to config.extraPlugins = 'autoembed'
like
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
CKEDITOR.replace( 'element', {
extraPlugins: 'sample'
} );
or in config.js
:
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
CKEDITOR.editorConfig = function( config ) {
config.plugins =
'sample,' +
...
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With