Contribute to this guideReport an issue

Content Templates Documentation

Overview

The Content Templates plugin allows to apply predefined formatting templates to the document content.

When enabled, it provides a dialog to offer a choice of predefined document templates - with page layout, text formatting and styles. It is included in the Full distribution. The plugin also adds the   toolbar button which lets the user invoke a dialog with predefined templates.

Content Templates

Use the Content Templates button to apply a selected template to content. You may add the template to an existing content, or replace it by checking the Replace actual content tick box.

Related Features

Get Sample Source Code

  • Content Templates
    <!doctype html>
    <html lang="en">
    
    <head>
      <meta charset="utf-8">
      <meta name="robots" content="noindex, nofollow">
      <title>Content Templates</title>
      <script src="https://cdn.ckeditor.com/4.19.1/standard-all/ckeditor.js"></script>
    </head>
    
    <body>
      <textarea cols="80" id="editor1" name="editor1" rows="10" data-sample-short>&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href=&quot;https://ckeditor.com/&quot;&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
      <script>
        CKEDITOR.replace('editor1', {
          extraPlugins: 'templates',
          height: 350,
          removeButtons: 'PasteFromWord'
        });
      </script>
    </body>
    
    </html>