CK编辑器format_tags

时间:2018-11-05 14:51:36

标签: html tags ckeditor

我没什么问题,我已经将h2-h6的format_tags更改为段落而不是标题,并且通常在单击已格式化的文本时,“格式下拉菜单”会检测格式并将下拉菜单中的文本更改为元素格式,例如,如果文本的格式设置为地址,而我单击该文本,则下拉菜单中的标题将从普通标题更改为地址,但是由于我更改了标签,因此不再检测格式。有可能解决该问题吗?

config.format_tags = 'p;h2;h3;h4;h5;h6;pre;address;div';

config.format_h2={element:"p", attributes: { 'class': 'h2' }};
config.format_h3={element:"p", attributes: { 'class': 'h3' }};
config.format_h4={element:"p", attributes: { 'class': 'h4' }};
config.format_h5={element:"p", attributes: { 'class': 'h5' }};
config.format_h6={element:"p", attributes: { 'class': 'h6' }};

0 个答案:

没有答案
相关问题