Why don't the list and code buttons appear in my editor?

≯℡__Kan透↙ 提交于 2019-12-24 09:48:12

问题


I've followed the docs to set up a TinyMCE component in my Angular project. Got the editors showing up but am running into two snags (so far):

I can't seem to get list formatting buttons to appear. I've tried using advlist by importing tinymce/plugins/advlist and adding them to plugins: ['link', 'table', 'advlist'], but I'm not seeing any change to the editor.

I'm also trying to find where to turn on the code editing button.

Using TinyMCE 4.5.6, angular-cli1.0.0-rc.0.


回答1:


Loading the plugins for lists is the first part of getting them working. You also need to add them to the toolbar configuration option:

toolbar: [
  "bold italic | bullist numlist",
  "code"
], 

To use the code view you need to both load the code plugin in your plugin list and add the code toolbar button to the toolbar configuration option.

Note: The advlist plugin expects that the lists plugin is also loaded so in order for advlist to work you likely need to also add the lists plugin.



来源:https://stackoverflow.com/questions/43371180/why-dont-the-list-and-code-buttons-appear-in-my-editor

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