2.0.3 • Published 3 years ago

@ckpro/ckeditor5-bookmark v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@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.

image

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.