ckeditor5-build-html-support v1.0.5
CKEditor 5 with HTML Support
This npm package extends the custom build of CKEditor 5 by adding general HTML support. With this package, you can integrate CKEditor 5 into your React applications with enhanced HTML editing capabilities.
Installation You can install the package via npm:
npm install ckeditor5-build-html-support
Or using yarn: yarn add ckeditor5-build-html-support
Usage in React To use CKEditor 5 with HTML support in your React application, follow these steps:
Import the Editor component from the package:
import Editor from 'ckeditor5-build-html-support'; Use the Editor component in your React component:
<Editor onChange={(editor) => { // Handle editor change event }} onReady={(editor) => { // Handle editor ready event // You can store the editor instance or perform any necessary operations }} initialData={initialContent} // Set initial content for the editor
// other props />
import React from 'react';
import Editor from 'ckeditor5-build-html-support';
const MyEditor = () => {
const initialContent = '<p>Hello, CKEditor!</p>';
const handleEditorReady = (editor) => {
console.log('Editor is ready:', editor);
};
return (
<div>
<h2>CKEditor 5 Example</h2>
<Editor
onReady={handleEditorReady}
initialData={initialContent}
></Editor>
</div>
);
};
export default MyEditor;