Problem/Motivation
I followed instructions here to upgrade my text format to CKE5.
I previously had a Styles CKE button allowing me to add h2, h3,... tags, BUT not h1. After I upgraded, my Styles button is replaced with a Headings button. That's OK but now I can add h1 tags, which should not happen.
Steps to reproduce
The config files I had are attached. Obviously there are other problems on upgrade path but this issue is only about Styles to Headings change (#3222797: Upgrade path from CKEditor 4's StylesCombo to CKEditor 5's Style).
Proposed resolution
Has the Headings button is configurable, the headings available should be limited to those which were already allowed.
Remaining tasks
Find what's wrong in the code of CKE5 upgrade path and fix it.
User interface changes
None, except a fix.
API changes
None.
Data model changes
None.
Release notes snippet
No need.
| Comment | File | Size | Author |
|---|---|---|---|
| filtered_html-editor-before.yml | 1.91 KB | gaëlg | |
| filtered_html-format-before.yml | 5.79 KB | gaëlg |
Comments
Comment #2
gaëlgComment #3
longwaveYour stylescombo config allowed h1 before? So I think that after the upgrade, h1 is allowed because of this.
Comment #4
gaëlgAhh... Good catch! Actually h1 was in stylescombo editor config, but was not allowed in format config. So it was not an option in the UI.
I'm not sure the upgrade path should be smarter in such a case where the previous config was somewhat inconsistent... At least there's a message:
Comment #5
wim leersIt has to be "smarter". In order for
<h1>to be supported (i.e. the tag can be created), this is necessary.CKEditor 5 would not allow the equivalent configuration: StylesCombo in CKE4 and Style in CKE5 are intended not to support additional tags, but to create a particular "style/variant" of a tag (i.e.
<tag class="some-style">). If you tried to configure CKE5 in the equivalent way, you'd get a validation error.