37.1.1 • Published 12 months ago
ckeditor5-build-floating-editor v37.1.1
CKEditor 5 editor custom builder
CKEditor 5 - v37.1.0
Fixed toolbar not working correctly on Modal/Popup.
Fixed
Installation
- Install this library in your project.
npm i ckeditor5-build-floating-editor
Configuration
Field | Type | Description |
---|---|---|
container | HTMLElement | Default: Window, Listen for the scroll event from this object. |
panelAbsolute | Boolean | Default: false, Set position is absolute. false(position=fixed), true(position=absolute) |
React:
import {CKEditor} from "@ckeditor/ckeditor5-react";
import FloatingEditor from "ckeditor5-build-floating-editor";
export interface Props {
onChange?: (html: string, content?: string) => void
data?: string
container?: HTMLElement
config: any
}
export default function TextEditor(props: Props) {
const config = {
...props.config,
container: props.container,
panelAbsolute: true,
}
return (
<CKEditor
config={config}
editor={FloatingEditor}
data={props.data ?? ''}
onChange={(event: any, editor: any) => {
// ...
}}
/>
);
}