Dark modeNederlands

CKEditor plugin

The CKEditor plugin adds Clippy Editor to any CKEditor 5 editor, also outside Drupal and TYPO3. Editors then get notifications while they write, explaining how to fix each problem. Using Drupal or TYPO3? Then the plugin is already part of Clippy Editor for Drupal and Clippy Editor for TYPO3.

Installation

The plugin works with CKEditor 5 version 43 or later.

npm install ckeditor5 @nl-design-system-community/ckeditor-plugin

Usage

The package contains two CKEditor plugins:

  • ClippyPlugin shows the accessibility notifications in the editor.
  • ClippyAltTextWizard adds the alt-text wizard to the alt-text balloon of an image. For that, the editor also needs Image and ImageTextAlternative.

Add them to the plugins of your editor:

import { ClassicEditor, Essentials, Heading, Image, ImageTextAlternative, ImageToolbar, Paragraph } from 'ckeditor5';
import { ClippyAltTextWizard, ClippyPlugin } from '@nl-design-system-community/ckeditor-plugin';
import 'ckeditor5/ckeditor5.css';

await ClassicEditor.create(document.querySelector('#editor'), {
  licenseKey: 'GPL',
  plugins: [Essentials, Heading, Paragraph, Image, ImageTextAlternative, ImageToolbar, ClippyPlugin, ClippyAltTextWizard],
  toolbar: ['heading'],
  image: { toolbar: ['imageTextAlternative'] },
});

Demo

This CKEditor contains text with accessibility problems. Edit the text and see which notifications Clippy Editor gives.