Project

General

Profile

Actions

Task #99670

open

Epic #99669: CKEditor5 Collection

Story #101906: CKEditor5 missing plugins

CKEditor5 add highlight module

Added by Benjamin Kott over 1 year ago. Updated 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-01-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The highlight module allows to set colors and backgrounds for text selections.
In CKEditor4 it was nessesary to define a styleset to enable text-highlights.

stylesSet:
    - { name: "Muted", element: "span", attributes: { 'class': 'text-muted' } }
    - { name: "Primary", element: "span", attributes: { 'class': 'text-primary' } }
    - { name: "Secondary", element: "span", attributes: { 'class': 'text-secondary' } }
    - { name: "Tertiary", element: "span", attributes: { 'class': 'text-tertiary' } }
    - { name: "Quaternary", element: "span", attributes: { 'class': 'text-quaternary' } }
    - { name: "Success", element: "span", attributes: { 'class': 'text-success' } }
    - { name: "Info", element: "span", attributes: { 'class': 'text-info' } }
    - { name: "Warning", element: "span", attributes: { 'class': 'text-warning' } }
    - { name: "Danger", element: "span", attributes: { 'class': 'text-danger' } }

Add basic migrations for common frameworks like bootstrap to the new highlight definition format,
instead of adding them to the new styles section.

The highlight plugin has 2 types of markers that can be used. "marker" and "pen"
- Marker is used as background
- Pen is used as text color

Currently it is unknown if the model is fixed or it can be extended with custom values

Example definitions:

highlight.options = [
    { 
        model: 'primaryMarker', 
        class: 'bg-primary', 
        title: 'Primary Marker', 
        color: 'var(--bs-primary)', 
        type: 'marker' 
    }
]
highlight.options = [
    { 
        model: 'primaryPen', 
        class: 'text-primary', 
        title: 'Primary Pen', 
        color: 'var(--bs-primary)', 
        type: 'pen' 
    }
]


See Documentation:
https://ckeditor.com/docs/ckeditor5/latest/features/highlight.html
Actions #1

Updated by Benjamin Kott over 1 year ago

  • Category set to RTE (rtehtmlarea + ckeditor)
Actions #2

Updated by Benjamin Kott over 1 year ago

  • Subject changed from Add highlight module to CKEditor5 to CKEditor5 add highlight module
Actions #3

Updated by Benjamin Franzke 8 months ago

  • Parent task changed from #99669 to #101906
Actions

Also available in: Atom PDF