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.