Angular2.0

Angular4的ng2-ckeditor富文本编辑框的使用

2018-04-11  本文已影响21人  杀个程序猿祭天

Angular4的ng2-ckeditor富文本编辑框的使用

样式如下:

使用方法如下:首先cli配置并且安装ng2-ckeditor:

"ng2-ckeditor": "^1.1.6"

然后再app.module中引入

import {CKEditorModule} from 'ng2-ckeditor';

imports: [  CKEditorModule]

在index.html中引入js

src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js">src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js">

src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js">

最后就是用到富文本编辑器的标签:

ts

上一篇 下一篇

猜你喜欢

热点阅读