简体   繁体   English

如何删除TYPO3 v10的CKEditor RTE中的字体?

[英]How to remove the fonts in CKEditor RTE of TYPO3 v10?

I need to remove some of the fonts listed in the CKEditor RTE.我需要删除 CKEditor RTE 中列出的一些字体。图片

Is this possible?这可能吗? How to do this?这该怎么做?

Thank you!谢谢!

AFAIK, fonts are being listed from system-specific and listed in the CKeditor. AFAIK,字体从特定于系统的列表中列出并在 CKeditor 中列出。 But, you can customize this.但是,您可以自定义它。

I am not sure about YAML configuration for the TYPO3, But, you can use Javascript to archive this.我不确定 TYPO3 的YAML配置,但是,您可以使用 Javascript 将其存档。 You can override Javascript for an override font option.您可以为覆盖字体选项覆盖 Javascript。

Javasrcript Java脚本

CKEDITOR.config.font_names = 'Arial/Arial, Helvetica, sans-serif;' +
    'Comic Sans MS/Comic Sans MS, cursive;' +
    'Courier New/Courier New, Courier, monospace;' +
    'Georgia/Georgia, serif;' +
    'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
    'Tahoma/Tahoma, Geneva, sans-serif;' +
    'Times New Roman/Times New Roman, Times, serif;' +
    'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
    'Verdana/Verdana, Geneva, sans-serif';

YAML (Not tested!) YAML(未测试!)

According to the configuration formate, below yaml configuration should work.根据配置格式,下面的yaml配置应该可以工作。 But, I have not tested ;)但是,我还没有测试;)

editor:
  config:

    font_names: "Arial/Arial, Helvetica, sans-serif;"

Here is the official document: font_names这是官方文档: font_names

Code example: Example代码示例: 示例

Hope this works!希望这有效!

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

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