What is @ckeditor/ckeditor5-html-embed?
@ckeditor/ckeditor5-html-embed is a plugin for CKEditor 5 that allows users to embed raw HTML content into the editor. This can be useful for embedding custom HTML snippets, third-party widgets, or any other HTML content that needs to be rendered within the editor.
What are @ckeditor/ckeditor5-html-embed's main functionalities?
Embedding HTML
This feature allows users to embed raw HTML content directly into the CKEditor 5 instance. The code sample demonstrates how to initialize CKEditor 5 with the HtmlEmbed plugin and add the 'htmlEmbed' button to the toolbar.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ HtmlEmbed, ... ], toolbar: [ 'htmlEmbed', ... ] })
Configuring HTML Embed
This feature allows users to configure the HTML embed functionality, such as enabling HTML previews and providing a custom HTML sanitization function. The code sample shows how to set these configurations during the editor initialization.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ HtmlEmbed, ... ], toolbar: [ 'htmlEmbed', ... ], htmlEmbed: { showPreviews: true, sanitizeHtml: (inputHtml) => { return { html: inputHtml, hasChanged: false }; } } })
Other packages similar to @ckeditor/ckeditor5-html-embed
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It supports embedding custom HTML content through its Delta format and custom blot extensions. Compared to @ckeditor/ckeditor5-html-embed, Quill offers a different approach to embedding HTML by using its own data structure and API.
tinymce
TinyMCE is a popular rich text editor that provides extensive customization options, including the ability to embed raw HTML content. It offers a similar feature set to @ckeditor/ckeditor5-html-embed but with a different API and configuration options. TinyMCE is known for its flexibility and wide range of plugins.
froala-editor
Froala Editor is a lightweight WYSIWYG editor with a focus on performance and user experience. It allows embedding custom HTML content through its API and supports various customization options. Compared to @ckeditor/ckeditor5-html-embed, Froala Editor provides a more streamlined and user-friendly interface.
CKEditor 5 HTML embed feature

This package implements the HTML embed feature for CKEditor 5. It allows embedding an arbitrary HTML snippet in the rich-text editor.
Installation
This plugin is part of the ckeditor5
package. Install the whole package to use it.
npm install ckeditor5
Create free account
If you want to check full CKEditor 5 capabilities, sign up for a free non-commitment 14-day trial.
Demo
Check out the demo in the HTML embed feature guide.
Documentation
See the @ckeditor/ckeditor5-html-embed
package page as well as the HTML embed feature guide in CKEditor 5 documentation.
License
Licensed under a dual-license model, this software is available under:
For more information, see: https://ckeditor.com/legal/ckeditor-licensing-options.
44.3.0 (March 5, 2025)
We are happy to announce the release of CKEditor 5 v44.3.0.
Release Highlights
This release brings a couple of minor improvements and bug fixes:
- Link Decorators: We fixed the behavior of the multiple manual link decorators that set the
rel
attribute. The fix happened so deep in the engine that we improved the overall performance of the editor slightly as well.
- Added a new
EmptyBlock
plugin: From now on, new plugin prevents adding
to the output data of blocks, works similarly to the fillEmptyBlocks
configuration in CKEditor 4.
- Support for the
<hr>
element in the General HTML Support plugin enhanced: attributes of the <hr>
element are now properly preserved if configuration allows it.
- Emoji: We enhanced emoji support for better compatibility with users' older devices.
For more details, see the changelog below.