我有一個tinyMCE和ich watn來創建自己的樣式格式,但它沒有顯示在我的tinymce中。有人知道什麼是錯的?我必須在哪裏放置我的按鈕「格式」,我可以選擇特殊的格式嗎?tinyMce:自己的格式不顯示
tinyMCE.init({
mode: "exact",
elements: "mytextarea",
theme: "advanced",
plugins: "table,paste,wordcount",
width: "480",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
convert_newlines_to_brs: true,
invalid_elements : "p",
forced_root_block: false,
force_br_newlines: true,
force_p_newlines: false,
theme_advanced_statusbar_location: "bottom",
theme_advanced_buttons1: "forecolor,|,bold,|,pastetext,|,bullist",
theme_advanced_buttons3: "",
theme_advanced_buttons2: "",
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'}
],
formats: {
alignleft: {selector: 'h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'left'},
aligncenter: {selector: 'h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'center'},
alignright: {selector: 'h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'right'},
alignfull: {selector: 'h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'full'},
bold: {inline: 'span', 'classes': 'bold'},
italic: {inline: 'span', 'classes': 'italic'},
underline: {inline: 'span', 'classes': 'underline', exact: true},
strikethrough: {inline: 'del'},
customformat: {inline: 'span', styles: {color: '#00ff00', fontSize: '20px'}, attributes: {title: 'My custom format'}}
}
});
您正在使用哪個tinyMCE版本? – opp
我正在使用verision 3 – Zwen2012
你能爲此創建一個tinymce小提琴嗎? – Thariama