這樣我初始化tinyMCE到textarea。字體,粗體斜體正在工作,但字體大小選擇不起作用。如何在tinyMCE中添加字體大小的工具欄?
tinymce.init({
selector: "textarea#content",
theme: "modern",
width: 586,
height: 300,
menubar:false,
font_size_classes : "fontSize1, fontSize2, fontSize3, fontSize4, fontSize5, fontSize6",//i used this line for font sizes
content_css: "css/content.css",
toolbar: "sizeselect | bold italic | fontselect | fontsize",//used font size for showing font size toolbar
style_formats: [
{title: 'Bold text', inline: 'b'},
{title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
],
});**
反正我有12px的展示,而不是「字體大小」的 – Hasnain 2013-04-29 16:05:10
看到我更新的帖子 – Thariama 2013-04-30 05:07:45