Sign up (with export icon)

Plugins in CKEditor 5

Contribute to this guide Show the table of contents

Features in CKEditor are introduced by plugins. In fact, without plugins, CKEditor 5 is an empty API with no use. Plugins provided by the CKEditor core team are available in npm (and GitHub, too) in the form of npm packages. A package may contain one or more plugins (for example, the @ckeditor/ckeditor5-image package contains several granular plugins).

Starting with CKEditor 5 v42.0.0, we collect all plugins in two aggregate packages: ckeditor5 and ckeditor5-premium-features. Using those two is the recommended way of setup. This way you get easy access to all the plugins, without the need to look which plugin is in which package.

Common use cases

Copy link

Plugins can be pretty much anything. They are pieces of code initialized by the editor if they are configured to be loaded. They can use the richness of the CKEditor 5 Framework API to enhance the editor or to better integrate it with your application.

Common use cases for plugins are:

  • Editing features, like bold, heading, linking, or any other feature that the user can use to manipulate the content.
  • Adding semantic value to the content, like annotations or accessibility features.
  • Third-party services integration, for injecting external resources into the content, like videos or social network posts.
  • Handling image upload and image manipulation features.
  • Providing widgets for easy integration with application structured data.
  • Injecting analysis tools that help enhance the quality of the content.
  • And other infinite possibilities.

Creating plugins

Copy link

Creating your own plugins is a straightforward task, but it requires good knowledge about some aspects of the CKEditor 5 development environment. The following resources are recommended as a starting point:

A good understanding of the CKEditor 5 Framework is also welcome when it comes to creating plugins.

Using third-party plugins

Copy link

A great way to enhance your editor with additional features is by using plugins created by the community. Such plugins are available as npm packages, so a quick search on the “ckeditor5” keyword in npm should work as a starting point.

Once you have plugins you want to include, learn how to install them.

Plugins and HTML output

Copy link

Listed below are all official CKEditor 5 packages as well as some partner packages together with their possible HTML output. If a plugin generates a different HTML output depending on its configuration, it is described in the “HTML output” column.

The classes, styles or attributes applied to an HTML element are all possible results. It does not mean they all will always be used.

$block is a generic structural element that may contain textual content. Features like headings or paragraph implement it to inherit common behaviors. You can read more about it in the Schema guide.

If a given plugin does not generate any output, the “HTML output” is described as “None.” Wildcard character * means any value is possible.

The data used to generate the following tables comes from the package metadata. You can read more about it in the package metadata guide.

ckeditor5-adapter-ckfinder

Copy link

Source file: not published yet

PluginHTML output

CKFinder upload adapter

Feature guide

None.

ckeditor5-alignment

Copy link

Source file: not published yet

PluginHTML output

Alignment

Feature guide

<$block style="text-align:*">

By default, the alignment feature uses the text-align inline style.

<$block class="*">

If config.alignment.options is set, these classes are used for alignment instead of inline styles.

ckeditor5-autoformat

Copy link

Source file: not published yet

PluginHTML output

Autoformat

Feature guide

None.

ckeditor5-autosave

Copy link

Source file: not published yet

PluginHTML output

Autosave

Feature guide

None.

ckeditor5-basic-styles

Copy link

Source file: not published yet

PluginHTML output

Bold

Feature guide

<strong>

Code

Feature guide

<code>

Italic

Feature guide

<i>

Strikethrough

Feature guide

<s>

Subscript

Feature guide

<sub>

Superscript

Feature guide

<sup>

Underline

Feature guide

<u>

ckeditor5-block-quote

Copy link

Source file: not published yet

PluginHTML output

Block quote

Feature guide

<blockquote>

ckeditor5-bookmark

Copy link

Source file: not published yet

PluginHTML output

Bookmark

Feature guide

<a id="*">

ckeditor5-ckbox

Copy link

Source file: not published yet

PluginHTML output

CKBox

Feature guide

<a data-ckbox-resource-id="*"><figure data-ckbox-resource-id="*"><img data-ckbox-resource-id="*">

If config.ckbox.ignoreDataId is set to false (off), the asset ID as the data-ckbox-resource-id attribute is added on the inserted elements (by default).

CKBox Image Edit

Feature guide

None.

ckeditor5-ckfinder

Copy link

Source file: not published yet

PluginHTML output

CKFinder

Feature guide

None.

ckeditor5-cloud-services

Copy link

Source file: not published yet

PluginHTML output

Cloud Services

Feature guide

None.

ckeditor5-code-block

Copy link

Source file: not published yet

PluginHTML output

Code blocks

Feature guide

<pre>
<code class="language-*">

By default, the language of the code block is represented as a CSS class prefixed by language-

<code class="*">

The CSS class name can be customized via the config.codeBlock.languages array.

ckeditor5-easy-image

Copy link

Source file: not published yet

PluginHTML output

Easy Image

None.

ckeditor5-emoji

Copy link

Source file: not published yet

PluginHTML output

Emoji

Feature guide

None.

Emoji mention

Feature guide

None.

Emoji picker

Feature guide

None.

ckeditor5-essentials

Copy link

Source file: not published yet

PluginHTML output

Essentials

<br>

ckeditor5-find-and-replace

Copy link

Source file: not published yet

PluginHTML output

Find and replace

Feature guide

None.

ckeditor5-font

Copy link

Source file: not published yet

PluginHTML output

Font background color

Feature guide

<span style="background-color:*">

Font color

Feature guide

<span style="color:*">

Font size

Feature guide

<span class="text-tiny text-small text-big text-huge">

If the config.fontSize.options option is not set or it contains predefined named presets, the feature uses class names.

<span style="font-size:*">

If the config.fontSize.options option contains numerical values, the font size feature uses the font-size inline style.

<*
class="*"
style="*:*"
>

The plugin can be configured to return any element with any classes and any inline styles.

Font family

Feature guide

<span style="font-family:*">

By default, the font family feature uses the font-family inline style.

<*
class="*"
style="*:*"
>

The plugin can be configured to return any element with any classes and any inline styles.

ckeditor5-fullscreen

Copy link

Source file: not published yet

PluginHTML output

Fullscreen mode

Feature guide

None.

ckeditor5-heading

Copy link

Source file: not published yet

PluginHTML output

Title

Feature guide

<h1>

Heading

Feature guide

<h2><h3><h4>

HTML element may contain classes, styles or attributes, that are created by other plugins, which alter the <$block> element.

This element inherits all attributes, classes and styles that are allowed on the <$block> element by other features.

<*>

The plugin can be configured to return any element name as a heading.

ckeditor5-highlight

Copy link

Source file: not published yet

PluginHTML output

Highlight

Feature guide

<mark class="marker-yellow marker-green marker-pink marker-blue pen-red pen-green">

By default, this plugin has 4 markers and 2 pens preconfigured.

<mark class="*">

The plugin can be configured to set any classes on the <mark> element.

ckeditor5-horizontal-line

Copy link

Source file: not published yet

PluginHTML output

Horizontal line

Feature guide

<hr>

ckeditor5-html-embed

Copy link

Source file: not published yet

PluginHTML output

HTML embed

Feature guide

<div class="raw-html-embed">
<*
class="*"
style="*:*"
>

The plugin can output any arbitrary HTML provided by the user. That HTML is always wrapped with a <div class="raw-html-embed"> element.

ckeditor5-html-support

Copy link

Source file: not published yet

PluginHTML output

General HTML Support

Feature guide

<*
class="*"
style="*:*"
*="*"
>

The plugin can output any arbitrary HTML configured by config.htmlSupport option.

Data filter

<*
class="*"
style="*:*"
*="*"
>

The plugin can output any arbitrary HTML depending on its configuration.

Data schema

None.

Empty block

None.

HTML comment

Feature guide

The plugin can output HTML comments that were added from the editor inital data or by the plugin API.

Full page HTML

Feature guide

None.

ckeditor5-image

Copy link

Source file: not published yet

PluginHTML output

Auto image

Feature guide

None.

Block image

Feature guide

<figure class="image">
<img
alt="*"
height="*"
sizes="*"
src="*"
srcset="*"
width="*"
>

Inline image

Feature guide

<img
alt="*"
height="*"
sizes="*"
src="*"
srcset="*"
width="*"
>

Image

Feature guide

None.

Image caption

Feature guide

<figcaption>

Image resize

Feature guide

<figure
class="image_resized"
style="height:*; width:*"
>
<img
class="image_resized"
style="aspect-ratio:*; height:*; width:*"
>

Image style

Feature guide

<figure class="image-style-side image-style-align-left image-style-align-right image-style-block-align-center image-style-block-align-left image-style-block-align-right">
<figure class="*">

The plugin can be configured to set any class names on the <figure> element.

Image toolbar

Feature guide

None.

Image upload

Feature guide

None.

Image insert

Feature guide

None.

Image insert via URL

Feature guide

None.

Image utils

Feature guide

None.

Image editing

Feature guide

None.

ckeditor5-indent

Copy link

Source file: not published yet

PluginHTML output

Indent

Feature guide

None.

Indent block

Feature guide

<$block style="margin-left:*; margin-right:*">

By default, the plugin uses inline styles for indentation.

<$block class="*">

If classes are defined in config.indentBlock.classes, they are used instead of inline styles.

ckeditor5-language

Copy link

Source file: not published yet

PluginHTML output

Text part language

Feature guide

<span
dir="*"
lang="*"
>
Copy link

Source file: not published yet

PluginHTML output

Autolink

Feature guide

None.

Link

Feature guide

<a href="*">
<a
rel="*"
target="*"
>

If config.link.addTargetToExternalLinks is enabled, then the external links are decorated with rel and target attributes.

<a
class="*"
style="*:*"
*="*"
>

The plugin can be configured to set any classes, styles or attributes on the <a> tag via custom config.link.decorators configuration.

Link image

Feature guide

<a href="*">

ckeditor5-list

Copy link

Source file: not published yet

PluginHTML output

Legacy list

Feature guide

<ol><ul>
<li>

HTML element may contain classes, styles or attributes, that are created by other plugins, which alter the <$block> element.

Legacy to-do list

Feature guide

<ul class="todo-list">
<li>
<label class="todo-list__label">
<span class="todo-list__label__description">
<input
checked="*"
disabled="*"
type="*"
>

Legacy list properties

Feature guide

<ol
style="list-style-type:*"
start="*"
reversed="*"
>
<ul
style="list-style-type:*"
start="*"
reversed="*"
>

List

Feature guide

<ol><ul>
<li>

List formatting

Feature guide

None.

List item bold integration

Feature guide

<li class="ck-list-marker-bold">

List item italic integration

Feature guide

<li class="ck-list-marker-italic">

List item font size integration

Feature guide

<li
class="ck-list-marker-font-size ck-list-marker-font-size-tiny ck-list-marker-font-size-small ck-list-marker-font-size-big ck-list-marker-font-size-huge"
style="--ck-content-list-marker-font-size:*"
>

List item font color integration

Feature guide

<li
class="ck-list-marker-color"
style="--ck-content-list-marker-color:*"
>

List item font family integration

Feature guide

<li
class="ck-list-marker-font-family"
style="--ck-content-list-marker-font-family:*"
>

To-do list

Feature guide

<ul class="todo-list">
<li>
<label class="todo-list__label todo-list__label_without-description">
<span class="todo-list__label__description">
<input
checked="*"
disabled="*"
type="*"
>

List properties

Feature guide

<ol
style="list-style-type:*"
start="*"
reversed="*"
type="*"
>
<ul
style="list-style-type:*"
start="*"
reversed="*"
type="*"
>

ckeditor5-markdown-gfm

Copy link

Source file: not published yet

PluginHTML output

Markdown

Feature guide

None.

ckeditor5-media-embed

Copy link

Source file: not published yet

PluginHTML output

Media embed

Feature guide

<figure class="media">
<oembed url="*">

If config.mediaEmbed.previewsInData is turned off, the media preview is not displayed and the media is represented using only the <oembed> tag (by default).

<div data-oembed-url="*">

If config.mediaEmbed.previewsInData is turned on, the media preview is displayed in the view.

<* url="*">

If config.mediaEmbed.previewsInData is turned off, the plugin can be configured to return any element name specified by config.mediaEmbed.elementName.

<div style="height:*; padding-bottom:*; position:*">

If config.mediaEmbed.previewsInData is turned on, the media preview is displayed in the view.

<iframe
style="height:*; left:*; position:*; top:*; width:*"
*allow*="*"
frameborder="*"
src="*"
>

If config.mediaEmbed.previewsInData is turned on, the media preview is displayed in the view.

<*
class="*"
style="*:*"
*="*"
>

The plugin can be configured to return any element with any class, inline style, and attribute, via config.mediaEmbed.providers for previewable media.

Media embed toolbar

Feature guide

None.

ckeditor5-mention

Copy link

Source file: not published yet

PluginHTML output

Mention

Feature guide

<span
class="mention"
data-mention="*"
>

ckeditor5-minimap

Copy link

Source file: not published yet

PluginHTML output

Content minimap

Feature guide

None.

ckeditor5-page-break

Copy link

Source file: not published yet

PluginHTML output

Page break

Feature guide

<div
class="page-break"
style="page-break-after:*"
>
<span style="display:*">

ckeditor5-paragraph

Copy link

Source file: not published yet

PluginHTML output

Paragraph

<p>

HTML element may contain classes, styles or attributes, that are created by other plugins, which alter the <$block> element.

This element inherits all attributes, classes and styles that are allowed on the <$block> element by other features.

ckeditor5-paste-from-office

Copy link

Source file: not published yet

PluginHTML output

Paste from Office

Feature guide

None.

ckeditor5-remove-format

Copy link

Source file: not published yet

PluginHTML output

Remove format

Feature guide

None.

ckeditor5-restricted-editing

Copy link

Source file: not published yet

PluginHTML output

Restricted editing mode

Feature guide

<span class="restricted-editing-exception">

Standard editing mode

Feature guide

<span class="restricted-editing-exception">

ckeditor5-select-all

Copy link

Source file: not published yet

PluginHTML output

Select all

Feature guide

None.

ckeditor5-show-blocks

Copy link

Source file: not published yet

PluginHTML output

Show blocks

Feature guide

None.

ckeditor5-source-editing

Copy link

Source file: not published yet

PluginHTML output

Source code editing

Feature guide

None.

ckeditor5-special-characters

Copy link

Source file: not published yet

PluginHTML output

Special characters

Feature guide

None.

Special characters essentials

Feature guide

None.

Special characters arrows

Feature guide

None.

Special characters currency

Feature guide

None.

Special characters latin

Feature guide

None.

Special characters mathematical

Feature guide

None.

Special characters text

Feature guide

None.

ckeditor5-style

Copy link

Source file: not published yet

PluginHTML output

Style

Feature guide

<* class="*">

The plugin can output any arbitrary HTML depending on its configuration.

ckeditor5-table

Copy link

Source file: not published yet

PluginHTML output

Table

Feature guide

<figure class="table">
<table><thead><tbody><tr>
<td
colspan="*"
rowspan="*"
>
<th
colspan="*"
rowspan="*"
>

Table cell properties

Feature guide

<td style="background-color:*; border:*; border-*:*; height:*; padding:*; text-align:*; vertical-align:*; width:*"><th style="background-color:*; border:*; border-*:*; height:*; padding:*; text-align:*; vertical-align:*; width:*">

Table properties

Feature guide

<figure style="float:*; height:*; width:*">
<table style="background-color:*; border:*; border-*:*">

Table layout

Feature guide

Table toolbar

Feature guide

None.

Table caption

Feature guide

<figcaption data-placeholder="*">

Table column resize

Feature guide

<colgroup>
<col style="width:*">

PlainTableOutput

Feature guide

<table><thead><tbody><tr>
<td
colspan="*"
rowspan="*"
>
<th
colspan="*"
rowspan="*"
>

ckeditor5-typing

Copy link

Source file: not published yet

PluginHTML output

Text transformation

Feature guide

None.

ckeditor5-ui

Copy link

Source file: not published yet

PluginHTML output

Block toolbar

Feature guide

None.

Accessibility help

Feature guide

None.

ckeditor5-undo

Copy link

Source file: not published yet

PluginHTML output

Undo

Feature guide

None.

ckeditor5-upload

Copy link

Source file: not published yet

PluginHTML output

Base64 upload adapter

Feature guide

None.

Simple upload adapter

Feature guide

None.

ckeditor5-watchdog

Copy link

Source file: not published yet

PluginHTML output

Watchdog

Feature guide

None.

ckeditor5-word-count

Copy link

Source file: not published yet

PluginHTML output

Word count

Feature guide

None.

mathtype-ckeditor5

Copy link

Source file: not published yet

PluginHTML output

MathType

Feature guide

<* *="*">

For a complete list of available MathML element and attribute names, visit MDN Web Docs for MathML.

wproofreader-ckeditor5

Copy link

Source file: not published yet

PluginHTML output

WProofreader

Feature guide

None.