基於 vue.js 富文字編輯框CKEditor 5

今天給大家分享一款不錯的Vue圖文編輯器元件

CKEditor5

基於 vue.js 富文字編輯框CKEditor 5

ckeditor5

基於

Vue

的富文字編輯框元件,易於定製,具有現代UI和基於外掛的模組化體系結構,提供了原生的

CKEditor 5 Vue。js

整合。

總共有

5種

不同的風格。

@ckeditor/ckeditor5-build-classic@ckeditor/ckeditor5-build-inline@ckeditor/ckeditor5-build-balloon@ckeditor/ckeditor5-build-balloon-block@ckeditor/ckeditor5-build-decoupled-document

這裡僅介紹@ckeditor/ckeditor5-build-classic,其他風格類似。

安裝

$ npm i @ckeditor/ckeditor5-build-classic

引入

import ClassicEditor from ‘@ckeditor/ckeditor5-build-classic’

Here goes the initial content of the editor。

ClassicEditor 。create( document。querySelector( ‘#editor’ ) ) 。then( editor => { console。log( editor ); } ) 。catch( error => { console。error( error ); } );

Classic模式

基於 vue.js 富文字編輯框CKEditor 5

Balloon模式

基於 vue.js 富文字編輯框CKEditor 5

Balloon Block模式

基於 vue.js 富文字編輯框CKEditor 5

Inline模式

基於 vue.js 富文字編輯框CKEditor 5

Document模式

基於 vue.js 富文字編輯框CKEditor 5

# 文件地址https://ckeditor。com/docs/ckeditor5/# 倉庫地址https://github。com/ckeditor/ckeditor5-vue

ok,今天的分享就到這裡。感興趣的話,可以去了解一下哈~