gpt4 book ai didi

javascript - ng2-ckeditor 使用 typescript 和 angular 2.0 添加占位符插件

转载 作者:行者123 更新时间:2023-11-30 15:51:51 25 4
gpt4 key购买 nike

我试图在 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".

这是控制台日志截图 - enter image description here

我还创建了一个 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com