为什么列表和代码按钮没有出现在我的编辑器中? [英] Why don't the list and code buttons appear in my editor?

查看:49
本文介绍了为什么列表和代码按钮没有出现在我的编辑器中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照文档设置了我的Angular项目中的TinyMCE组件.让编辑出现,但遇到了两个障碍(到目前为止):

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):

我似乎无法显示列表格式按钮.我尝试通过导入 tinymce/plugins/advlist 并将其添加到 plugins中来使用advlist:['link','table','advlist'] ,但是我我看不到编辑器有任何更改.

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.

使用TinyMCE 4.5.6,angular-cli1.0.0-rc.0.

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

推荐答案

为列表加载插件是使它们工作的第一步.您还需要将它们添加到 toolbar 配置选项中:

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"
], 

要使用代码视图,您需要在插件列表中加载 code 插件,并将 code 工具栏按钮添加到 toolbar 配置选项.

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.

注意: advlist 插件希望还加载 lists 插件,以便使 advlist 能够您可能还需要添加 lists 插件.

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.

这篇关于为什么列表和代码按钮没有出现在我的编辑器中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆