简体   繁体   English

TYPO3 8种ckeditor样式设置多个类以“ bg”开头的类名不起作用

[英]TYPO3 8 ckeditor stylesSet multiple Classes start Classname with “bg” does not work

I've noticed a strange behavior with the yaml configuration since the TYPO3 update from 8.19 to 8.22 in the section stylesSet with several classes. 我注意到yaml配置的行为很奇怪,因为TYPO3在具有几个类的stylesSet部分中从8.19更新为8.22。 It does not longer work, if the class name starts with "bg" and if is not defined as the first class. 如果类名以“ bg”开头并且未定义为第一类,则它将不再起作用。

stylesSet:
  - { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "button bgcolor pink"} }

However, if i put the class "bgcolor" first, then the styleset "bgcolor-pink" is displayed again in the ckeditor and it works. 但是,如果我先放置类“ bgcolor”,则样式集“ bgcolor-pink”将再次显示在ckeditor中,并且可以正常工作。

 stylesSet:
  - { name: "bgcolor-pink", element: ['p', 'div'] , attributes: { class: "bgcolor button pink"} }

I thought maybe this has something to do with stylesheetParser_skipSelectors but could not find clues. 我以为这可能与stylesheetParser_skipSelectors有关,但找不到线索。

I'm grateful for an answer. 谢谢您的回答。

I ran into this problem a while ago as well. 不久前,我也遇到了这个问题。 After some searching I found out it's a bug in ckeditor. 经过一番搜索,我发现这是ckeditor中的错误。 Classes have to be listed alphabetically or it will not work. 必须按字母顺序列出课程,否则将不起作用。 The problem is that in one part of ckeditor the classes are sorted and then later checked against the original configuration, which isn't sorted. 问题在于,在ckeditor的一部分中,对类进行了排序,然后根据未进行排序的原始配置进行了检查。 The bug's been known for a while (at least 4 years, see https://dev.ckeditor.com/ticket/13206 ), but doesn't seem to be fixed yet. 该错误已经存在了一段时间(至少4年,请参见https://dev.ckeditor.com/ticket/13206 ),但似乎尚未修复。 The only 'fix' right now is to list the classes alphabetically. 现在唯一的“解决方法”是按字母顺序列出类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM