我像这样使用tinymce style_formats:
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'}}
]
});列表框的标题是"Styles“我想把它改成"Line Height”。
我需要在哪里换车?我在lang的文件里找不到。
谢谢
发布于 2012-12-18 12:33:53
打开tinymce-->themes-->advanced-->lang-->en.js
将"style_select":"Styles"更改为“style_select”:“行高”
希望它能有所帮助!!
注意:无论何时将tinymce更新到新版本,您都必须牢记这一更改。
发布于 2012-12-18 15:48:38
要更改标题,可以修改tiny_mce/themes/advanced/langs/en.js下的lang文件,如所述的“显示名称”。
但为了避免每次更新到新的tinymce版本时都必须修改此文件,您可以使用tinymce.init中的oninit和setup tinymce配置参数更改标题:
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';
});
}
});https://stackoverflow.com/questions/13922136
复制相似问题