Custom Templates logo

Custom Templates plugin

Define, update and re-use custom templates in your content
Custom Templates screenshot
Custom Templates screenshotInsert custom template screenshot
Custom Templates logo

Add custom code snippets to your collection and get quick access to it. You can catalog all predefined templates into categories. All new templates will have screenshots that are generated automatically.

Content management is pretty easy with custom templates. Insert one by clicking on it in the library and it will be added.

Editor42 logo Editor42
TinyMCE logo TinyMCE
CKEditor 4 logo CKEditor 4
TinyMCE 5 logo TinyMCE 5
TinyMCE 4 logo TinyMCE 4

Install Custom Templates plugin in Editor42

Download Custom Templates
ZIP archive of Custom Templates for Editor42
Self-hosted Editor42
Editor42 from CDN

Install the plugin to Editor42 hosted on your server

  1. Copy CustomTemplates directory to editor42/plugins/.
  2. Edit Editor42 config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample Editor42 initialization code with config inside it:

editor42.init({
    selector: "#editor",
    plugins: "CustomTemplates",

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Install the plugin to Editor42 loaded from CDN

  1. Copy CustomTemplates directory somewhere on your server where it can be accessible by a link.
  2. Specify the location of just copied Custom Templates plugin adding key-value pair in external_plugins Editor42 config parameter.
  3. Edit Editor42 config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample initialization code of Editor42 loaded from CDN with config inside it:

editor42.init({
    selector: "#editor",
    plugins: "CustomTemplates",
    external_plugins: {
        "CustomTemplates": "http://example.com/public/CustomTemplates/plugin.min.js",
    },

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Custom Templates comes as a part of N1ED. Read the official installation manual on developer website to know more.

Install Custom Templates plugin in TinyMCE

Download Custom Templates
ZIP archive of Custom Templates for TinyMCE
Self-hosted TinyMCE
Cloud TinyMCE

Install the plugin to TinyMCE hosted on your server

  1. Copy CustomTemplates directory to tinymce/plugins/.
  2. Edit TinyMCE config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample TinyMCE initialization code with config inside it:

tinymce.init({
    selector: "#editor",
    plugins: "CustomTemplates",

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Install the plugin to cloud edition of TinyMCE

  1. Copy CustomTemplates directory somewhere on your server where it can be accessible by a link.
  2. Specify the location of just copied Custom Templates plugin adding key-value pair in external_plugins TinyMCE config parameter.
  3. Edit TinyMCE config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample cloud TinyMCE initialization code with config inside it:

tinymce.init({
    selector: "#editor",
    plugins: "CustomTemplates",
    external_plugins: {
        "CustomTemplates": "http://example.com/public/CustomTemplates/plugin.min.js",
    },

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Custom Templates comes as a part of N1ED. Read the official installation manual on developer website to know more.

Install Custom Templates plugin in CKEditor 4

Download Custom Templates
ZIP archive of Custom Templates for CKEditor 4

Then do these simple steps:

  1. From the archive, copy plugins/CustomTemplates/ to ckeditor/plugins/CustomTemplates/, and its skin skins/n1theme/ to ckeditor/skins/n1theme/.
  2. Edit CKEditor config: add CustomTemplates to extraPlugins parameter and switch the skin to n1theme.

All the buttons this plugin will add to your toolbar automatically.

Using config file
Using initialization script

If you prefer to edit config.js of CKEditor, or your CKEditor is initialized in some non-editable part of your CMS, make these changes there:

CKEDITOR.editorConfig = function(config) {
    config.extraPlugins = "CustomTemplates";
    config.skin = "n1theme";                   // N1ED's own theme for CKEditor
    config.allowedContent = true;              // keep the classes and attributes N1ED writes
    config.removePlugins = "iframe,magicline"; // N1ED has better support of this
    config.versionCheck = false;               // skip its upgrade notice of CKEditor itself

    // config.apiKey = "...";
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
};

Some CMSs do not use config.js and let you edit only the CKEditor initialization script. Make these changes there:

CKEDITOR.replace("editorId", {
    extraPlugins: "CustomTemplates",
    skin: "n1theme",                   // N1ED's own theme for CKEditor
    allowedContent: true,              // keep the classes and attributes N1ED writes
    removePlugins: "iframe,magicline", // N1ED has better support of this
    versionCheck: false,               // skip its upgrade notice of CKEditor itself

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Custom Templates comes as a part of N1ED. Read the official installation manual on developer website to know more.

Install Custom Templates plugin in TinyMCE 5

Download Custom Templates
ZIP archive of Custom Templates for TinyMCE 5
Self-hosted TinyMCE 5
Cloud TinyMCE 5

Install the plugin to TinyMCE 5 hosted on your server

  1. Copy CustomTemplates directory to tinymce/plugins/.
  2. Edit TinyMCE config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample TinyMCE initialization code with config inside it:

tinymce.init({
    selector: "#editor",
    plugins: "CustomTemplates",

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Install the plugin to cloud edition of TinyMCE 5

  1. Copy CustomTemplates directory somewhere on your server where it can be accessible by a link.
  2. Specify the location of just copied Custom Templates plugin adding key-value pair in external_plugins TinyMCE config parameter.
  3. Edit TinyMCE config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample cloud TinyMCE initialization code with config inside it:

tinymce.init({
    selector: "#editor",
    plugins: "CustomTemplates",
    external_plugins: {
        "CustomTemplates": "http://example.com/public/CustomTemplates/plugin.min.js",
    },

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Custom Templates comes as a part of N1ED. Read the official installation manual on developer website to know more.

Install Custom Templates plugin in TinyMCE 4

Download Custom Templates
ZIP archive of Custom Templates for TinyMCE 4

Then do these simple steps:

  1. Copy CustomTemplates directory to tinymce/plugins/.
  2. Edit TinyMCE config and add CustomTemplates to plugins parameter.

All the buttons this plugin will add to your toolbar automatically.

Example

Here you can see sample TinyMCE initialization code with config inside it:

tinymce.init({
    selector: "#editor",
    plugins: "CustomTemplates",

    // apiKey: "...",
    // Get your own key in the Dashboard: https://n1ed.com/dashboard
});

Custom Templates comes as a part of N1ED. Read the official installation manual on developer website to know more.

Reviews

Some snippets are usually needed from time to time, and some always. Every time when I inserted one of the code pieces in the source dialog I was missing such plugin.

User icon
Ron K.
Individual