首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >微型mce style_formats标题

微型mce style_formats标题
EN

Stack Overflow用户
提问于 2012-12-18 05:02:04
回答 2查看 985关注 0票数 3

我像这样使用tinymce style_formats:

代码语言:javascript
复制
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的文件里找不到。

谢谢

EN

回答 2

Stack Overflow用户

发布于 2012-12-18 12:33:53

打开tinymce-->themes-->advanced-->lang-->en.js

"style_select":"Styles"更改为“style_select”:“行高”

希望它能有所帮助!!

注意:无论何时将tinymce更新到新版本,您都必须牢记这一更改。

票数 1
EN

Stack Overflow用户

发布于 2012-12-18 15:48:38

要更改标题,可以修改tiny_mce/themes/advanced/langs/en.js下的lang文件,如所述的“显示名称”。

但为了避免每次更新到新的tinymce版本时都必须修改此文件,您可以使用tinymce.init中的oninit和setup tinymce配置参数更改标题:

代码语言:javascript
复制
tinymce.EditorManager.i18n['en.advanced.style_select'] = 'Line Height';

因此,您可以使用:

代码语言:javascript
复制
tinyMCE.init({
   ...
   setup : function(ed) {
     ed.onBeforeRenderUI.add(function(ed, cm) {
         tinymce.EditorManager.i18n['en.advanced.style_select'] = 'Line Height';
     });
   }
});
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13922136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档