This plugin lets you insert rich code snippets with syntax highlighting into the editor.
The default implementation uses the integrated highlight.js library, but the plugin can be easily customized to use a different syntax highlighter, including a server-side one. An example of such implementation is the Code Snippet GeSHi plugin that is an extension of this plugin.
Additionally, the you can also use the following configuration options:
- config.codeSnippet_theme - to change the default highlighter theme.
- config.codeSnippet_languages - to change the list of supported languages.
See the Code Snippet plugin documentation for more information.
The recommended way to install all CKEditor add-ons is to create a custom build by using Online builder. To do that, click the Add to my editor button on the plugin page. When you are done, click the Build my editor button on the right side of the page to go to Online builder.
Note: This add-on is already selected to be a part of your current build.
Add-on installation instructions
If you want to add the plugin manually, you will need to:
- Extract the downloaded plugin
pluginsfolder of your CKEditor installation. Example:
- Enable the plugin by using the
extraPluginsconfiguration setting. Example:
config.extraPlugins = 'codesnippet';
- Download and configure all its dependencies, too.
|Plugin versions||CKEditor versions|
The second bug fixing release after the CKEditor 4.9 major release.
Another major release: CKEditor 4.8.
Another bugfixing release for CKEditor 4.7.
The first minor release for CKEditor 4.6.2.
Another bug fixing release for the 4.5 series.
Another bug-fixing release for the 4.4 series.