Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@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.
npm install ckeditor5
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.
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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.