@ckpro/ckeditor5-bookmark
v2.0.3
Published
Bookmark Plugin for CKEditor 5.
Downloads
14
Readme
@CKPro Bookmark
@CKPro Bookmark is a free bookmark plugin for CKEditor 5. It solves the problem of creating bookmarks, <a name="bookmark-name"></a>, in bigger documents.
There is an in-dept tutorial, how to build a CKEditor 5 bookmark plugin, based on the ckeditor5-bookmark plugin here : CKBookmark - a CKEditor 5 plugin tutorial.
Below is a short usage documentation.
//#1 : In your CKEditor5 build file ADD a reference to @ckpro/ckeditor5-bookmark:
// app.js
import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import Bookmark from '@ckpro/ckeditor5-bookmark'; // ADD THIS
// ...
export default class ClassicEditor extends ClassicEditorBase { }
ClassicEditor.builtinPlugins = [
Essentials,
Autoformat,
Bold,
Italic,
Bookmark // ADD THIS
// ...
]
//#2 : Then creating the CKEditor5 add the bookmark button :
ClassicEditor.create(document.querySelector('#editor'), {
toolbar: [
'heading',
'bold',
'italic',
'bookmark' // ADD THIS
// ...
]
// ...
});
See other @CKPro plugins for CKEditor 5.