例子1:
tinyMCE.init({
mode : "textareas",
theme : "simple" //总共两种模板:advanced和simple
});
例子2:
tinyMCE.init({
theme : "advanced", //总共两种模板:advanced和simple
theme_advanced_toolbar_location : "top", //工具栏默认是在底部,调到顶部的话要加入这个句配置。
theme_advanced_toolbar_align : "left", //工具栏按钮默认是全局居中,要让按钮左对齐要加入这句配置。
theme_advanced_statusbar_location : "bottom", //默认是不显示状态栏的(功能和DW的状态栏一样),加入此句子可以调出状态栏并且显示在编辑器下方。
theme_advanced_resizing : true, //可以动态调整编辑器大小(按钮在编辑器右下方)
mode : "textareas",
skin: "o2k7" //这是office风格,挺清爽的。
});
例子3:
tinyMCE.init({
theme : "advanced", //高级模式
plugins : "safari,pagebreak,style,table,advhr,advimage,advlink,emotions,
inlinepopups,insertdatetime,preview,media,searchreplace,print,
contextmenu,paste,directionality,fullscreen,noneditable,visualchars,
nonbreaking,xhtmlxtras", //声明要调用的插件,必须写,否则下面功能无法使用。
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,
justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,
blockquote,forecolor,backcolor,|,styleprops", //工具栏第一行按钮组(第一行,如果按钮数量超过编辑器宽度会被隐藏)
theme_advanced_buttons3 : "tablecontrols,|,hr,|,replace,removeformat,visualaid,pagebreak,|,
charmap,emotions,media,advhr,searchreplace,|,insertdate,inserttime,
preview,||,preview,fullscreen,|,print", //工具栏第三行按钮组(第三行,第二行是高级模式系统默认预留的,无法修改,所以直接跳到第三行。)
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
mode : "textareas",
skin: "o2k7"
});
TinyMCE官方网站