Sorry, you need to enable JavaScript to visit this website.

Insert <pre> element

This plugin makes it easier to insert a <pre> tag in CKEditor.


1. Download the plugin and unpack it in the plugins folder

2. Enable the "insertpre" plugin in the CKEditor configuration file (config.js):

config.extraPlugins = 'insertpre';

That's all. "InsertPre" button will appear on the editor toolbar and will be ready to use.

Optionally, you may specify which class should be added to the <pre> element:

CKEDITOR.config.insertpre_class = 'prettyprint';

As well as specify how the <pre> tag should be rendered inside CKEditor:

CKEDITOR.config.insertpre_style = 'background-color:#F8F8F8;border:1px solid #DDD;padding:10px;';



50,205 downloads (view stats)


Plugin versions CKEditor versions
4.9 4.8 4.7

Version: 1.1

DownloadRelease notes

First version compatible with CKEditor 4.1 and Advanced Content Filter.

Version: 1.0.1

DownloadRelease notes

Fixed ugly JS error. Upgrading is recommended.

Twitter Facebook Facebook Instagram Medium Google+ GitHub Arrow down Phone Menu Close icon Check