Thanks to CKEditor Team and Opeoluwa Iyi-Kuyoro.
The customize CKEditor 5 component to easily integrate for React.
npm install --save rc-ckfulleditor
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:
- Installation for how to install this package and what it contains.
- Basic API for how to create an editor and interact with it.
- Configuration for how to configure the editor.
- Creating custom builds for how to customize the build (configure and rebuild the editor bundle).
- Puff-Puff Document for how to customize upload image adapter
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.
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.