Skip to main content

Install Blk42 in CKEditor 5

Blk42 adds Bootstrap/Tailwind layout features to your editor implementing best practices of CKEditor 5. Then you can insert a new block with selected grid layout, edit the grid, fill the block with contents, and save blocks as templates for future use.

  • Install NPM package

    Blk42 plugin is distributed in an NPM package that is easy to add into your existing CKEditor 5 build project for further compilation.

    npm install --save-dev @blk42/blk42-ckeditor5
  • Include to build

    Add Blk42 into your import section:

    import {
    ClassicEditor,
    Image,
    Essentials,
    Paragraph,
    Bold,
    Italic
    } from 'ckeditor5';
    import Blk42 from "@blk42/blk42-ckeditor5";

    Then pass this plugin to the plugins section of your ClassicEditor creation method call and set the API key:

    ClassicEditor.create(
    document.querySelector('#editor'), // your editor selector
    {
    plugins: [
    Essentials,
    Paragraph,
    Bold,
    Italic,
    Blk42
    ],
    Blk42: {
    // apiKey: "...",
    // Get in the Dashboard: https://blk42.com/dashboard
    }
    }
    ).then( editor => {
    console.log(editor);
    } ).catch( error => {
    console.error(error.stack);
    } );
  • Build

    Build your CKEditor 5 project or your project with CKEditor 5 imported to apply newly added plugin.

    If you see a new bottom toolbar of the editor, everything works fine.

  • Ready to Use

Configuration

Configure your Blk42 CKEditor 5 installation with visual configuration editor. Set Bootstrap/Tailwind options, share custom blocks between your websites.

Dashboard

Examples

Live CodePlay examples for CKEditor 5 with JS/CSS/HTML code provided.

Other integrations

Use one of this articles if they better describe your case: