我正在尝试在angular2中的ckeditor的内联模式下将stylesheetparser插件添加到ng2-ckeditor模块。但我在样式下拉列表中使用右方括号以及" Source" ckeditor中的按钮丢失了。
例如:div.editable]
我使用以下代码添加插件
CKEDITOR.config.extraPlugins =' stylesheetparser';
使用的ckeditor的CDN版本是" https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"
请帮我找一个解决方案。
先谢谢
答案 0 :(得分:0)
添加此代码是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>