如何在 angular 2 RC1 版本中向 Ckeditor 添加自定义按钮
how to add a custom button to Ckeditor in angular 2 RC1 version
我可以使用以下代码在 Angular 2 RC1 中使用 Ckeditor :
`http://plnkr.co/edit/X5whPqDhLS6RjTR2N8hT?p=preview
但我不知道如何将自定义按钮添加到工具栏。感谢您的帮助。
CKEditor 提供了 API 来做,只需按照本教程进行操作:
http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1
要在 Typescript 中直接使用它,您需要使用 TSD:
安装 CKEditor 定义文件
npm i tsd -g
然后:
tsd install ckeditor --save
不要忘记在编译周期中添加 d.ts 文件,通常在应用程序入口点内:
/// <reference path="../typings/ckeditor/ckeditor.d.ts" />
我可以使用以下代码在 Angular 2 RC1 中使用 Ckeditor :
`http://plnkr.co/edit/X5whPqDhLS6RjTR2N8hT?p=preview
但我不知道如何将自定义按钮添加到工具栏。感谢您的帮助。
CKEditor 提供了 API 来做,只需按照本教程进行操作: http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1
要在 Typescript 中直接使用它,您需要使用 TSD:
安装 CKEditor 定义文件npm i tsd -g
然后:
tsd install ckeditor --save
不要忘记在编译周期中添加 d.ts 文件,通常在应用程序入口点内:
/// <reference path="../typings/ckeditor/ckeditor.d.ts" />