What is @ckeditor/ckeditor5-basic-styles?
@ckeditor/ckeditor5-basic-styles is a package that provides basic text styling features for CKEditor 5. It includes functionalities such as bold, italic, underline, and strikethrough text formatting.
What are @ckeditor/ckeditor5-basic-styles's main functionalities?
Bold
This feature allows you to apply bold formatting to the selected text in the editor.
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ Bold, ... ],
toolbar: [ 'bold', ... ]
} )
.catch( error => {
console.error( error );
} );
Italic
This feature allows you to apply italic formatting to the selected text in the editor.
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ Italic, ... ],
toolbar: [ 'italic', ... ]
} )
.catch( error => {
console.error( error );
} );
Underline
This feature allows you to apply underline formatting to the selected text in the editor.
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ Underline, ... ],
toolbar: [ 'underline', ... ]
} )
.catch( error => {
console.error( error );
} );
Strikethrough
This feature allows you to apply strikethrough formatting to the selected text in the editor.
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ Strikethrough, ... ],
toolbar: [ 'strikethrough', ... ]
} )
.catch( error => {
console.error( error );
} );
Other packages similar to @ckeditor/ckeditor5-basic-styles
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It provides similar basic text styling features such as bold, italic, underline, and strikethrough, but also includes more advanced features and a different API structure compared to @ckeditor/ckeditor5-basic-styles.
tinymce
TinyMCE is a popular rich text editor that offers a wide range of text formatting options, including basic styles like bold, italic, underline, and strikethrough. It is highly customizable and provides a robust set of features similar to @ckeditor/ckeditor5-basic-styles.
draft-js
Draft.js is a framework for building rich text editors in React. It provides basic text styling features and allows for extensive customization and extension. While it offers similar functionalities to @ckeditor/ckeditor5-basic-styles, it is more focused on providing a flexible API for developers to build custom editors.