问题描述
限时送ChatGPT账号..我正在使用tinymce style_formats,如下所示:
i'm using tinymce style_formats like this:
style_formats : [
{title : '20px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '20px'}},
{title : '25px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '25px'}},
{title : '30px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '30px'}},
{title : '35px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '35px'}},
{title : '40px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '40px'}},
{title : '45px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '45px'}},
{title : '50px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '50px'}},
{title : '55px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '55px'}},
{title : '60px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '60px'}},
{title : '65px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '65px'}},
{title : '70px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '70px'}},
{title : '75px', selector : 'p,div,h1,h2,h3,h4,h5,h6', styles: {lineHeight: '75px'}}
]
});
列表框的标题是样式",我想将其更改为行高".
The title of the listbox is "Styles" i want to change it to "Line Height".
我需要在哪里更改?我在 lang 文件中找不到它.
Where I need to change? I can't find it in the lang files.
谢谢
推荐答案
要改标题可以修改tiny_mce/themes/advanced/langs/en.js
下的lang文件就像描述的显示名称"一样.
To change the title can modify the lang files under tiny_mce/themes/advanced/langs/en.js
like "Display Name" described.
但是为了避免每次更新到新的 tinymce 版本时都必须修改此文件,您可以使用 tinymce.init 中的 oninit 和 setup tinymce 配置参数更改标题:
But to avoid to have to modify this file everytime you update to a new tinymce version you may change the title using the oninit and setup tinymce configuration parameter in tinymce.init:
tinymce.EditorManager.i18n['en.advanced.style_select'] = 'Line Height';
所以,你可以使用:
tinyMCE.init({
...
setup : function(ed) {
ed.onBeforeRenderUI.add(function(ed, cm) {
tinymce.EditorManager.i18n['en.advanced.style_select'] = 'Line Height';
});
}
});
这篇关于微小的 mce style_formats 标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论