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.
44.2.0 (February 12, 2025)
We are happy to announce the release of CKEditor 5 v44.2.0.
Release Highlights
🖥️ Enhanced Source Code Editing (⭐)
Introducing new premium feature: Enhanced Source Code Editing. It displays the source code in a dialog and is compatible with all editor types. It offers syntax highlighting, code completion, code folding, and other advanced functionalities. Additionally, it supports both HTML and Markdown formats.
📤 Uploadcare and image optimizer (⭐)
We have integrated the Uploadcare image manager service, enabling you to upload and edit images to their cloud environment. You can upload files from various sources, including local devices, social media, or online drives ensuring rapid uploads. The integration takes care of efficient media delivery with responsive images mechanism, making sure your users will save bandwidth and have faster website loading. You can also optimize images with the built-in image editor which offers a range of features, such as cropping, rotating, flipping, photo filters and more. All this directly from the editor, try it out!
🖼️ Image Merge Fields (⭐)
Image merge fields are a new type of merge fields, dedicated for image placeholders. They maintain all standard image interactions, like styling, resizing or captions (in which you can use merge fields too!) At the same time, they keep all merge fields functionalities, like data previews or document export integration. In the document data, image merge fields are represented like other images, however their src
attribute is set to a respective merge field, for example, src="{{CompanyLogo}}"
, making them easy to post-process!
📝 Track Changes Preview (⭐)
We have added the preview mode that displays a document with all suggestions accepted. Accessible from the track changes dropdown, this modal preview helps check the final content without extensive markers.
😀 Emoji support
They are here! 🎉 🥳 🎊 Insert emojis effortlessly in the editor by typing :
or through a user-friendly emoji picker. This feature enhances the richness of your content by allowing quick access to a wide range of emojis.
⚡ Performance improvements: Part 4
Here comes the final batch of the planned performance improvements in the editor loading speed area, that we worked on through a couple of past releases.
- A new caching mechanism in
Mapper
now handles model-to-view mappings, substantially improving performance for loading and saving data. - Images with specified height and width automatically use
[loading="lazy"]
in the editing area, optimizing the loading time (read more on MDN). This attribute is only applied during editing to enhance the loading efficiency of images, and it does not reflect in the final data output.
We are greatly satisfied with the improved editor loading times. At the same time, we acknowledge some other problematic areas, and we will keep delivering more performance-related improvements in the future.