Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@ckeditor/ckeditor5-heading
Advanced tools
@ckeditor/ckeditor5-heading is a plugin for CKEditor 5 that provides heading functionality. It allows users to format text as headings of various levels, which is essential for structuring content in a meaningful way.
Basic Heading
This code initializes a CKEditor instance with the Heading plugin enabled. The toolbar includes a heading button that allows users to apply different heading levels to their text.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Heading ], toolbar: [ 'heading' ] })
Custom Heading Options
This code initializes a CKEditor instance with custom heading options. Users can choose from Paragraph, Heading 1, and Heading 2, each with its own styling.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Heading ], toolbar: [ 'heading' ], heading: { options: [ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }, { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' } ] } })
Advanced Heading Configuration
This code demonstrates an advanced configuration where additional heading levels (e.g., Heading 3) are added to the editor. This allows for more granular content structuring.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Heading ], toolbar: [ 'heading' ], heading: { options: [ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' }, { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }, { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' } ] } })
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It provides similar heading functionalities through its built-in formats and can be customized with modules. Compared to @ckeditor/ckeditor5-heading, Quill offers a more lightweight and flexible approach but may require more configuration for advanced use cases.
TinyMCE is a popular rich text editor that offers comprehensive heading options out of the box. It is highly customizable and supports a wide range of plugins. Compared to @ckeditor/ckeditor5-heading, TinyMCE provides a more extensive set of features but can be more complex to integrate and configure.
Draft.js is a JavaScript rich text editor framework maintained by Facebook. It allows for extensive customization and control over content editing, including heading functionalities. Unlike @ckeditor/ckeditor5-heading, Draft.js is more of a framework than a ready-to-use editor, requiring more development effort to achieve similar results.
This package implements the headings feature for CKEditor 5.
Check out the demo in the heading feature guide.
See the @ckeditor/ckeditor5-heading
package page in CKEditor 5 documentation.
Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md
file or https://ckeditor.com/legal/ckeditor-oss-license.
FAQs
Headings feature for CKEditor 5.
The npm package @ckeditor/ckeditor5-heading receives a total of 185,201 weekly downloads. As such, @ckeditor/ckeditor5-heading popularity was classified as popular.
We found that @ckeditor/ckeditor5-heading demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.