我试图在 CKEditor 工具栏中获取占位符插件,但是在将 extraPlugins:'placeholder'
添加到 CKEditor 配置时出现以下错误 -
Error: [CKEDITOR.resourceManager.load] Resource name "placeholder" was not found at "//cdn.ckeditor.com/4.5.9/standard/plugins/placeholder/plugin.js?t=G6DD".
我还创建了一个 plunker .
我已经通过 npm 安装了 "ng2-ckeditor": "^1.0.4"。
我能得到一些帮助吗?
最佳答案
你应该使用它:
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
你应该在你的 CKEdior 标签中使用:
<ckeditor
[(ngModel)]="sampleContent"
[config]="{uiColor: '#a0a0a0',extraPlugins:'placeholder'}"
debounce="500">
</ckeditor>
你可以使用:
(change)="onChange($event)"
但是你必须在你的组件中定义:
onChange(body:any) {
//your Code
}
关于javascript - ng2-ckeditor 使用 typescript 和 angular 2.0 添加占位符插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39208766/