Support conjunctions (and/or) [CKE5]

Created on 3 December 2024, 19 days ago

Problem/Motivation

It would be nice if WxT supported conjunctions (and/or) in CKEditor5.

wet-boew mΓ©li-mΓ©lo: https://wet-boew.github.io/gcweb-compiled-demos/m%C3%A9li-m%C3%A9lo-demos/2025-04-nahanni/2021-05-conjunction/index.html
In the wild: https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/calculating-deductions/making-deductions.html

We are running into these on a migration of CRA's main site to Drupal WxT. This markup does not display correctly because the styles are not available in our version of wet-boew. Also there is no good way of managing these components in CKE5 without Source mode.

Steps to reproduce

Paste this content into CKE5 and try to change it from an AND to an OR, etc...

<div class="cnjnctn-type-or">
    <section class="cnjnctn-col">
        <h5>Header A<span class="wb-inv">: Option 1 of 2</span></h5>
        <p>This is content for option A</p>
    </section>
    <section class="cnjnctn-col">
        <h5>Header B<span class="wb-inv">: Option 2 of 2</span></h5>
        <p>This is content for option B</p>
    </section>
</div>

Proposed resolution

Create a CKEditor5 plugin for conjunctions, allowing users to change Type (and/or), add responsive classes (cnjnctn-xs, cnjnctn-md, cnjnctn-lg, etc...), and change the number of columns (2,3,4,5,6).

What makes this plugin more difficult is that there are three types of configurations to support semantically:

  1. Wrapper is a div, children are divs
  2. Wrapper is a div, children are sections
  3. Wrapper is a ul, children are li

The plugin will by default use div/div for adding new widgets, but must support the other variations so they are recognized as widgets and can be managed (change config options) going forward.

User interface changes

A new button available for CKE5, design by @crow.

CKEditor5 view:

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Active

Version

5.3

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada smulvih2 Canada 🍁

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

Comments & Activities

Production build 0.71.5 2024