CKEditor 5 - Easy to integrate CKEditor 5 for React
The customize CKEditor 5 component to easily integrate for React.
Documentation
Quick start
First, install the build from npm:
npm install --save rc-ckfulleditor
And use it in your ReactJS application:
import React from 'react'
import CKFullEditor from 'rc-ckfulleditor'
const index = () => {
return (
<CKFullEditor
onChange={(event, editor) => {
const data = editor.getData()
console.log({ event, editor, data })
}}
/>
)
}
export default index
Config upload image via Cloudinary (use CloudinaryUnsigned of puff-puff)
import React from 'react'
import CKFullEditor from 'rc-ckfulleditor'
const index = () => {
return (
<CKFullEditor
config={{
// ...Ckeditor config
cloudinary: {
cloudName: YOUR_CLOUDINARY_NAME,
uploadPreset: YOUR_UNSIGNED_UPLOAD_PRESET_NAME
}
}}
/>
)
}
export default index
OR config upload image via your Upload Server (use CustomUpload of puff-puff)
import React from 'react'
import CKFullEditor from 'rc-ckfulleditor'
const index = () => {
return (
<CKFullEditor
config={{
// ...Ckeditor config
customUpload: {
url: YOUR_UPLOAD_URL
}
}}
/>
)
}
export default index
See:
Note: If you are planning to integrate CKEditor 5 deep into your application, it is actually more convenient and recommended to install and import the source modules directly (like it happens in ckeditor.js
). Read more in the Advanced setup guide.
License
Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md
file or https://ckeditor.com/legal/ckeditor-oss-license.