Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-html-support

Package Overview
Dependencies
Maintainers
1
Versions
578
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-html-support

HTML Support feature for CKEditor 5.


Version published
Weekly downloads
226K
increased by2.27%
Maintainers
1
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-html-support?

@ckeditor/ckeditor5-html-support is a plugin for CKEditor 5 that allows you to work with raw HTML content. It provides the ability to handle custom HTML elements and attributes, making it easier to integrate CKEditor 5 into applications that require advanced HTML support.

What are @ckeditor/ckeditor5-html-support's main functionalities?

Enabling HTML Support

This code demonstrates how to enable the HTML support plugin in CKEditor 5. By adding `HtmlSupport` to the `extraPlugins` array, you can start working with raw HTML content within the editor.

ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [HtmlSupport] })

Allowing Custom Elements

This code shows how to configure the editor to allow custom HTML elements, attributes, classes, and styles. In this example, the `div` element is allowed with all its attributes, classes, and styles.

ClassicEditor.create(document.querySelector('#editor'), { htmlSupport: { allow: [{ name: 'div', attributes: true, classes: true, styles: true }] } })

Disallowing Specific Elements

This code demonstrates how to disallow specific HTML elements. In this example, the `script` element is disallowed, preventing users from adding script tags to the content.

ClassicEditor.create(document.querySelector('#editor'), { htmlSupport: { disallow: [{ name: 'script' }] } })

Other packages similar to @ckeditor/ckeditor5-html-support

Keywords

FAQs

Package last updated on 05 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc