我想修改TinyMCE编辑器中的“Formats”菜单和工具栏,以便我可以进行嵌套选择 - 就像在TinyMCE主页(tinymce.com)上的示例一样。
例如,在格式下,我想创建三个名为header,tables和fonts的组。在每个组中,我想添加各种样式格式。
我知道如何创建我需要的不同样式格式,但我不知道如何在TinyMCE中创建“嵌套”菜单,我在TinyMCE网站上找不到任何这样的例子。
以下是我现在拥有的代码片段:
style_formats: [
{title: 'Header H1', block: 'h1'},
{title: 'Header H2', block: 'h2'},
{title: 'Header H3', block: 'h3'},
{title: 'Header H4', block: 'h4'},
{title: 'Header H5', block: 'h5'},
{title: 'Header H6', block: 'h6'},
{title: '8 Pt Font', inline: 'span', classes: 'font8'},
{title: '10 Pt Font', inline: 'span', classes: 'font10'},
{title: '12 Pt Font', inline: 'span', classes: 'font12'},
{title: '14 Pt Font', inline: 'span', classes: 'font14'},
{title: '16 Pt Font', inline: 'span', classes: 'font16'},
{title: '18 Pt Font', inline: 'span', classes: 'font18'},
{title: 'Vertical Align Top', selector: 'td', classes: 'cell1'},
{title: '10 px Image Padding', selector: 'img', classes: 'img10'},
{title: '20 px Image Padding', selector: 'img', classes: 'img20'},
{title: '10 px Video Padding', selector: 'iframe', classes: 'vid10'},
{title: 'Gray Cell', selector: 'td', classes: 'td-gray'},
{title: 'Red Cell', selector: 'td', classes: 'td-red'},
{title: 'Yellow Cell', selector: 'td', classes: 'td-yellow'},
{title: 'Green Cell', selector: 'td', classes: 'td-green'},
{title: 'Blue Cell', selector: 'td', classes: 'td-blue'}
]
我想把它分成逻辑组。有人可以让我在tinymce.int中这样做吗?
谢谢!