TYPO3 8 ckeditor stylesSet multiple 类 start Classname with "bg" 不起作用
TYPO3 8 ckeditor stylesSet multiple Classes start Classname with "bg" does not work
自从 TYPO3 从 8.19 更新到 8.22 后,我注意到 yaml 配置有一个奇怪的行为,其中包含几个 classes 的样式集部分。如果 class 名称以 "bg" 开头并且未定义为第一个 class.
,则它不再起作用
stylesSet:
- { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "button bgcolor pink"} }
但是,如果我把 class "bgcolor" 放在第一位,那么样式集 "bgcolor-pink" 会再次显示在 ckeditor 中并且它可以工作。
stylesSet:
- { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "bgcolor button pink"} }
我想这可能与 stylesheetParser_skipSelectors 有关,但找不到线索。
非常感谢您的回答。
我 运行 前段时间也遇到过这个问题。经过一番搜索,我发现这是 ckeditor 中的一个错误。 类 必须按字母顺序列出,否则将不起作用。问题是,在 ckeditor 的一部分中,类 被排序,然后根据未排序的原始配置进行检查。该错误已经为人所知有一段时间了(至少 4 年,参见 https://dev.ckeditor.com/ticket/13206),但似乎尚未修复。现在唯一的 'fix' 是按字母顺序列出 类。
自从 TYPO3 从 8.19 更新到 8.22 后,我注意到 yaml 配置有一个奇怪的行为,其中包含几个 classes 的样式集部分。如果 class 名称以 "bg" 开头并且未定义为第一个 class.
,则它不再起作用stylesSet:
- { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "button bgcolor pink"} }
但是,如果我把 class "bgcolor" 放在第一位,那么样式集 "bgcolor-pink" 会再次显示在 ckeditor 中并且它可以工作。
stylesSet:
- { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "bgcolor button pink"} }
我想这可能与 stylesheetParser_skipSelectors 有关,但找不到线索。
非常感谢您的回答。
我 运行 前段时间也遇到过这个问题。经过一番搜索,我发现这是 ckeditor 中的一个错误。 类 必须按字母顺序列出,否则将不起作用。问题是,在 ckeditor 的一部分中,类 被排序,然后根据未排序的原始配置进行检查。该错误已经为人所知有一段时间了(至少 4 年,参见 https://dev.ckeditor.com/ticket/13206),但似乎尚未修复。现在唯一的 'fix' 是按字母顺序列出 类。