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.
161,966 downloads (view stats)
This is an official plugin provided and supported by CKEditor developers.
You can submit bug reports directly to its GitHub issues tracker and discuss any integration issues on StackOverflow.
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|
First major release of CKEditor 4.21.0
Second minor release of CKEditor 4.20.2
The second minor release of CKEditor 4.19.1