![](/img/trans.png)
[英]How to add plugins to ng2-ckeditor using TypeScript and Angular 2 ?
[英]How to add predefined and custom ckeditor plugins to ng2-ckeditor
我正在尝试将angularsheet2的内联模式下的stylesheetparser插件添加到ng2-ckeditor模块中。 但是我在带有右方括号的样式下拉列表中得到输出,而且ckeditor中的“源”按钮也丢失了。
例如:div.editable]
我正在使用以下代码添加插件,
CKEDITOR.config.extraPlugins ='stylesheetparser';
所使用的ckeditor的CDN版本是“ https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js ”
请帮助我找到解决方案。
提前致谢
添加此代码是html和ts文件。 希望它能正常工作。
Component.ts
ckeConfig : any;
this.ckeConfig = {
height: 500,
width: '60%',
allowedContent: false,
fullPage : true,
toolbar: [
{ name: "styles", items: ['Format', 'Font', 'FontSize', "-", "TextColor", "BGColor"] },
{ name: "basicstyles", items: ["Bold", "Italic", "Underline", "RemoveFormat"] },
"/",
{ name: "justify", items: ["JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"] },
{ name: "paragraph", items: ["NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote"] },
{ name: "links", items: ["Link", "Unlink"] },
{ name: "insert", items: ["Image", "Table", "HorizontalRule", "Smiley","SpecialChar"] },
{ name: "document", items: ["Source"] },
]
};
Component.html:-
<ckeditor [config]="ckeConfig" ></ckeditor>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.