Admin Community Asked:2020-12-08 15:48:38 +0800 CST2020-12-08 15:48:38 +0800 CST 2020-12-08 15:48:38 +0800 CST 如何优化 ckeditor [关闭] 772 我将我的标签添加到 ckeditor,现在告诉我如何优化它?或者您如何将您的插件标签添加到优化的标签中? ckeditor 1 个回答 Voted Best Answer Visman 2020-12-08T17:58:07+08:002020-12-08T17:58:07+08:00 下载优化版的CKEditor并放到网站上; 使用新标签创建自己的插件并将其复制到已安装的 CKEditor 的插件文件夹中; 在页面上初始化 CKEditor(我在标签之前这样做</body>): <script type="text/javascript" src="http://ваш.сайт/js/ckeditor/ckeditor.js"></script> <script type="text/javascript"> CKEDITOR.replace( "ckeditor1" , { extraPlugins: "имяВашегоПлагина1,имяВашегоПлагина2", // <-- подключение ваших плагинов toolbarGroups: [ // <-- настройки кнопок { name: "basicstyles", groups: [ "basicstyles", "cleanup" ] }, { name: "paragraph", groups: [ "list", "indent", "blocks", "align", "bidi", "paragraph" ] }, { name: "links", groups: [ "links" ] }, { name: "insert", groups: [ "insert" ] }, "/", { name: "styles", groups: [ "styles" ] }, { name: "colors", groups: [ "colors" ] }, { name: "clipboard", groups: [ "clipboard", "undo" ] }, { name: "document", groups: [ "mode" ] } ], removeButtons: "Save,NewPage,Preview,Print,Templates,Find,Replace,BidiLtr,BidiRtl,Language,Flash,PageBreak,Iframe" } ); </script> 例如: CKEditor 的内容位于站点文件夹中js/ckeditor/; 你的插件在文件夹中js/ckeditor/plugins/имяВашегоПлагина1/,js/ckeditor/plugins/имяВашегоПлагина2/; ckeditor1“挂起”CKEditor 的文本区域的 ID。
在页面上初始化 CKEditor(我在标签之前这样做
</body>
):例如:
CKEditor 的内容位于站点文件夹中
js/ckeditor/
;你的插件在文件夹中
js/ckeditor/plugins/имяВашегоПлагина1/
,js/ckeditor/plugins/имяВашегоПлагина2/
;ckeditor1
“挂起”CKEditor 的文本区域的 ID。