我喜欢更改 Ckeditor 的默认字体!
我无法做到这一点,并且在文档中没有看到任何有关它的内容。 我只能更改它的默认标签!
谢谢
最佳答案
根据 docs这些似乎都在 plugins/font/plugin.js 中定义。
{Object} CKEDITOR.config.font_style 用于在文本中应用字体的样式定义。 定义于:plugins/font/plugin.js。
config.font_style =
{
element : 'span',
styles : { 'font-family' : '#(family)' },
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
};
{String} CKEDITOR.config.fontSize_defaultLabel 自:3.0 要在“字体大小”组合中显示的文本没有任何可用值与当前光标位置或文本选择相匹配。 定义于:plugins/font/plugin.js。
config.fontSize_defaultLabel = '12px';
{String} CKEDITOR.config.fontSize_sizes 自:3.0 要在工具栏的“字体大小”组合中显示的字体大小列表。条目以分号 (;) 分隔。可以使用任何类型的“CSS 类似”尺寸,例如“12px”、“2.3em”、“130%”、“更大”或“x-small”。可以选择通过在条目前添加名称和斜杠字符来定义显示名称。例如,“Bigger Font/14px”将在列表中显示为“Bigger Font”,但输出为“14px”。 定义于:plugins/font/plugin.js。
config.fontSize_sizes = '16/16px;24/24px;48/48px;';
config.fontSize_sizes = '12px;2.3em;130%;larger;x-small';
config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small';
我对 Ckeditor 不太了解,但我希望这会有所帮助!
关于javascript - 如何更改 Ckeditor 的默认字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52795230/