How can I add custom bullets to tinyMCE?

不羁岁月 提交于 2019-12-11 06:45:17

问题


I want to add a few extra option to the bullets dropdown on tinyMCE, is that possible?

I want to add ► type of bullet and different color options. (red, blue, etc...)


回答1:


Yes. In your tinyMCE config, you need to specify:

style_formats: [
    {
         title: 'Custom Bullet',
             selector: 'ul', 
             classes: 'custom1'
         }
],

From there, you need to specify the styling in the CSS:

.custom1 { list-style-image: url('custom1.png'); }

See this for more info: https://www.tinymce.com/docs/configure/content-formatting/#style_formats



来源:https://stackoverflow.com/questions/21485294/how-can-i-add-custom-bullets-to-tinymce

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!