Problem/Motivation

When configuring a style for caption elements, it cannot be applied to the table plugin model through the styles drop-down. Incidentally, it also cannot be applied through source editing mode, as it's stripped out, which might be a GHS issue.

See https://github.com/ckeditor/ckeditor5/issues/13777 for the blocking upstream issue.

Steps to reproduce

  1. Add caption.test|Caption test as a style option.
  2. Observe that the style cannot be applied via the styles dropdown.
  3. Add <caption class="test">Bah humbug</caption> via source editing mode, switch out of source editing mode, and back in, observing that the class attribute is gone.

Proposed resolution

Wait for the upstream issue to be resolved; upgrade; profit.

Remaining tasks

TBD

User interface changes

None (hopefully)

API changes

None (hopefully)

Data model changes

None (hopefully)

Release notes snippet

Comments

Luke.Leber created an issue. See original summary.

wim leers’s picture

Issue tags: +Needs upstream bugfix

Thanks for the impressively thorough bug report, including an upstream issue! 😮🤩🙏

wim leers’s picture

wim leers’s picture

Title: [upstream] Support adding class attribute to table captions » [upstream] [Style] Support adding class attribute to table captions
Status: Postponed » Closed (duplicate)
Parent issue: #3340578: [meta] [upstream] Prioritized CKEditor 5 upstream blockers » #3326261: [Style] Add tests for inability to apply styles to <div>, <ul>, <ol>, <table> etc. in CKEditor 5 — and <a> allows applying it to all elements
wim leers’s picture

Good news: https://github.com/ckeditor/ckeditor5/issues/13777 was fixed 2 days after you reported it here 😊