[英]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.