Add WYSIWYG/CKEditor 5 button for inserting spoiler

Created on 21 September 2023, about 1 year ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

Once ✨ Provide CKEditor 5-compatible filter Active , add a CKEditor 5 plugin so a spoiler can be added via the UI.

Proposed resolution

Build a CKEditor plugin to add & edit spoilers in a ckeditor5-compatible HTML format that uses one of the following approaches:

  1. Wraps the selected text in a <span> tag with the class "spoiler".
  2. Wraps the selected text in a <drupalspoiler> tag that can be converted via a text filter.

Additional parts that need to be done after the basic API works:

  • Admin CSS for controlling the appearance of the spoiler tag inside the editor.
  • Having the pointer inside a spoiler region should highlight the toolbar button.

Remaining tasks

Build the plugin.

User interface changes

A new CKEditor5 plugin would be available.

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Needs work

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024