37.1.1 • Published 12 months ago

ckeditor5-build-floating-editor v37.1.1

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
12 months ago

CKEditor 5 editor custom builder

CKEditor 5 - v37.1.0

Fixed toolbar not working correctly on Modal/Popup.

Fixed

Installation

  1. Install this library in your project.
npm i ckeditor5-build-floating-editor

Configuration

FieldTypeDescription
containerHTMLElementDefault: Window, Listen for the scroll event from this object.
panelAbsoluteBooleanDefault: 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) => {
                // ...
            }}
        />
    );
}