问题
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