CKEditor CDN

Speed up your website by loading CKEditor from CDN:

CKEditor 5

To start using CKEditor 5 Builds on your website, add a single <script> tag to your HTML page:

<script src="https://cdn.ckeditor.com/ckeditor5/41.3.1/classic/ckeditor.js"></script>

Quick example:

<!DOCTYPE html>
<html>
        <head>
                <meta charset="utf-8">
                <title>CKEditor</title>
                <script src="https://cdn.ckeditor.com/ckeditor5/41.3.1/classic/ckeditor.js"></script>
        </head>
        <body>
                <div id="editor">This is some sample content.</div>
                <script>
                        ClassicEditor
                                .create( document.querySelector( '#editor' ) )
                                .then( editor => {
                                        console.log( editor );
                                } )
                                .catch( error => {
                                        console.error( error );
                                } );
                </script>
        </body>
</html>

URL Structure

The URL structure for CKEditor 5 is as follows:

<script src="https://cdn.ckeditor.com/ckeditor5/[version.number]/[distribution]/ckeditor.js"></script>

The following distributions (see CKEditor 5 Builds overview) are available:

When choosing a different build than Classic editor, make sure in the example above to change not only the URL to a build but also the initialization code as each build comes with a different editor class (ClassicEditor, InlineEditor, BalloonEditor (used by Baloon editor and Balloon block editor), DecoupledEditor, MultiRootEditor).

CKEditor 4

Long Term Support

A special edition, CKEditor 4 LTS (“Long Term Support”), is available under commercial terms ("Extended Support Model") for anyone looking to extend the coverage of security updates and critical bug fixes.

To start using CKEditor 4 LTS on your website, add a single <script> tag to your HTML page:

<script src="https://cdn.ckeditor.com/4.24.0-lts/standard/ckeditor.js"></script>

Quick example:

<!DOCTYPE html>
<html>
        <head>
                <meta charset="utf-8">
                <title>CKEditor</title>
                <script src="https://cdn.ckeditor.com/4.24.0-lts/standard/ckeditor.js"></script>
        </head>
        <body>
                <textarea name="editor1"></textarea>
                <script>
                        CKEDITOR.replace( 'editor1' );
                </script>
        </body>
</html>

Open Source

To start using CKEditor 4 OS on your website, add a single <script> tag to your HTML page:

<script src="https://cdn.ckeditor.com/4.22.1/standard/ckeditor.js"></script>
Note: You may continue using CKEditor 4.22.1 and below under the open source license terms. Please note, however, that the open source version no longer comes with any security updates, so your application will be at risk.

URL Structure

The URL structure for CKEditor 4 is as follows:

<script src="https://cdn.ckeditor.com/[version.number]/[distribution]/ckeditor.js"></script>

The following distributions (see comparison table) are available:

* Plugins not included in a preset need to be enabled with config.extraPlugins.

Note: Due to a human error to use CKEditor 4.4.5, you should specify 4.4.5.1. The path that points to 4.4.5 actually points to an older version of CKEditor (4.3.5). To avoid issues on existing installations, we decided to keep the (invalid) old version under that path.

Enabling Local Plugins

To enable an extra plugin from a local folder while using CKEditor CDN, CKEDITOR.plugins.addExternal() must be called first so that CKEditor knew from where to load the plugin.

The CKEDITOR.plugins.addExternal() method accepts three parameters:

// Enable local "abbr" plugin from /myplugins/abbr/ folder.
CKEDITOR.plugins.addExternal( 'abbr', '/myplugins/abbr/', 'plugin.js' );

// extraPlugins needs to be set too.
CKEDITOR.replace( 'editor1', {
        extraPlugins: 'abbr'
} );

Enabling Local Skins

Enabling skins from a local folder is even easier than enabling plugins. To use a custom CKEditor skin while using CKEditor CDN, use config.skin and provide both, the skin name and the full URL after a comma:

// Enable "moonocolor" skin from the /myskins/moonocolor/ folder.
CKEDITOR.replace( 'editor1', {
        skin: 'moonocolor,/myskins/moonocolor/'
} );

Local Configuration Files

Some features in CKEditor are configured through JavaScript files by default. Since all files are loaded from remote CDN, there is no way to modify them directly. You can however instruct CKEditor to load local files instead, if you need to:

In case of setting any of the options above, it is highly recommended to download locally the same CKEditor package that is loaded from CDN in order to copy included configuration files and use them as base files for adding additional changes.

// Always provide paths that start with a slash character ("/").
CKEDITOR.replace( 'editor1', {
        customConfig: '/ckeditor_settings/config.js'
} );