如何在tinymce编辑器中启用字体系列和颜色选项?

时间:2012-09-03 11:51:42

标签: javascript fonts tinymce

我在我的cms上使用了一个tinymce编辑器,它有一个普通的文本工具栏,它有粗体,斜体,下划线和对齐选项,但它没有字体系列更改选项,甚至没有颜色变化。如何启用?

3 个答案:

答案 0 :(得分:8)

我这样做了

tinyMCE.init({
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
)};

答案 1 :(得分:4)

这里的升级版本是全功能的例子

CREATE INDEX ON :User(uuid)

更多参考访问https://www.tinymce.com/docs/demo/full-featured/

答案 2 :(得分:2)

在我的旧版TinyMCE 4.0.10中,除了你的其他初始化工具栏和插件选项之外,还将tinymce.init添加为字体和颜色控件:

toolbar: "styleselect fontselect fontsizeselect | forecolor backcolor",
plugins: "textcolor"
相关问题