How Do I Add Custom CKEditor Templates?

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

To add new templates, create a custom JavaScript file containing your template definitions. You can base your file on the built-in default.js file that can be found in the plugins/templates/templates directory of CKEditor.

When your definitions are ready, use the templates_files configuration setting to point to the custom template definition file.

config.templates_files = [ '/mytemplates.js' ];

More details on defining custom templates can be found in the Templates article of the CKEditor 3.x Developer's Guide.

This page was last edited on 23 March 2011, at 14:44.