CK5 induced scenarios - publish a new contrib module with text filter plugins

Created on 7 May 2025, 2 months ago

Problem/Motivation

ck5 destroys content in various scenarios:

  1. Videos getting wrapped in p elements causing wet-boew to be unable to play videos
  2. spans with anchors failing
  3. table tfoot element being removed.

The text filter plugins we developed is how we worked around these ck5 induced scenarios.

Steps to reproduce

Upgrade from ck4 to ck5

Proposed resolution

Publish a new contrib module, since this is wider than wxt scope.

Remaining tasks

Publish a new contrib module, perhaps cook in the plugins into the baseline text filter plugin configs

User interface changes

See issue summary

API changes

New text filter plugins

Data model changes

N/A

🐛 Bug report
Status

Active

Version

6.1

Component

Code

Created by

🇨🇦Canada joseph.olstad

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

Comments & Activities

  • Issue created by @joseph.olstad
  • 🇨🇦Canada joseph.olstad

    Another CK5 bug to fix
    Added label / anchor use case to the issue summary, described below

    CKEditor 4 accepted this:

    <li class="checkbox" id="chbx-p2">
    <input class="action-checkbox-2 cb-dmm" id="eg5-2" type="checkbox">
    <label for="eg5-2">You hold a federal wine licence issued by the Canada Revenue Agency (CRA) under 
    <a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017">section&nbsp;14 of the <cite>Excise Act, 2001</cite></a>, valid at the time you apply to the program and up to or after March&nbsp;31,&nbsp;2026
    </label>
    </li>

    CKEditor 5 turns the above into this (SURPRISE!):

    <li class="checkbox" id="chbx-p2">
    <input class="action-checkbox-2 cb-dmm" id="eg5-2" type="checkbox"> 
    <label for="eg5-2">You hold a federal wine licence issued by the Canada Revenue Agency (CRA) under </label>
    <a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017"><label for="eg5-2">section&nbsp;14 of the&nbsp;</label></a>
    <cite><a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017"><label for="eg5-2">Excise Act, 2001</label></a></cite>
    <label for="eg5-2">, valid at the time you apply to the program and up to or after March&nbsp;31,&nbsp;2026</label>
    </li>
  • 🇨🇦Canada joseph.olstad

    Ok so we have a partial solution for the above mentioned scenario (label fix) provided by the ckeditor5_label_fix module , the second part of it deals with the wxt distribution that needs a cite plugin adjustment.

    Now onto another scenario, this time it's caused by ckeditor5 vanilla

    CKEDITOR 4 markup:

    <sup id="fn1-1-rf"><a class="fn-lnk" href="#fn1"><span class="wb-inv">Footnote </span>1</a></sup>

    CKEDITOR 5 transforming to this:

    <a class="fn-lnk" href="#fn1"><span class="wb-inv"><sup id="fn1-1-rf">Footnote </sup></span><sup id="fn1-1-rf">1</sup></a>

    I'm working on a possible fix for this now.

  • 🇨🇦Canada joseph.olstad

    To get the fixes to the above mentioned scenarios:

    install and configure the ckeditor5_table_fix module

    install and configure the ckeditor5_label_fix module

    install and configure the ckeditor5_sup_fix module

    Each one of these modules has a dummy plugin that needs to be dragged onto the ck5 editor in the text format configuration for all text formats that need it (ones using ck5).

Production build 0.71.5 2024