ckeditor5-luongthanhnhi-custom-build

2.1.3 • Public • Published

###Installation: Using npm:

$ npm install ckeditor5-luongthanhnhi-custom-build

Using yarn:

$ yarn add ckeditor5-luongthanhnhi-custom-build

###Rebuilding editor:

$ npm run build
$ yarn build

How to use, Ex:

import ClassicEditor from "ckeditor5-luongthanhnhi-custom-build/build/ckeditor";
import { CKEditor } from "@ckeditor/ckeditor5-react";

const CkeditorComponent = ({ name, label, rules, data, onFocus, ...props }) => {
  const config = {
    extraPlugins: [uploadPlugin],
  };

  function uploadAdapter(loader) {
    return {
      upload: async () => {
        //Handle upload
      },
    };
  }

  function uploadPlugin(editor) {
    editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
      return uploadAdapter(loader);
    };
  }

  return (
    <CKEditor
      editor={ClassicEditor}
      data={data}
      config={config}
      onFocus={onFocus}
      {...props}
    />
  );
};

export default CkeditorComponent;

Readme

Keywords

none

Package Sidebar

Install

npm i ckeditor5-luongthanhnhi-custom-build

Weekly Downloads

4

Version

2.1.3

License

SEE LICENSE IN LICENSE.md

Unpacked Size

8.24 MB

Total Files

79

Last publish

Collaborators

  • luongthanhnhi