kritish-dhaubanjar / ckeditor5-build-classic-base64-upload-adapter

The classic editor build of CKEditor 5 with Base64UploadAdapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ckeditor5-build-classic-base64-upload-adapter

The classic editor build of CKEditor 5 with Base64UploadAdapter

Quick start

  1. Clone the build repository.
  2. Install the plugin package.
  3. Add it to the build configuration.
  4. Bundle the build.

Clone the build repository.

git clone -b stable https://github.com/ckeditor/ckeditor5

cd ckeditor5/packages/ckeditor5-build-classic
npm install

Now, install the plugin package:

npm install --save @ckeditor/ckeditor5-upload

Edit the src/ckeditor.js file to add your plugin to the list of plugins which will be included in the build and to add your feature’s button to the toolbar:

...
...
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter';

...

// Plugins to include in the build.
ClassicEditor.builtinPlugins = [
  ...
  Base64UploadAdapter,
]

Finally, bundle the build:

npm run build

If everything worked, the editor build (which is available in the build/ directory) should be updated.

jin@death-note:~/ckeditor5-build-classic-base64-upload-adapter/build$ ls

-rw-rw-r-- 1 jin jin  719976 May  8 13:07 ckeditor.js
-rw-rw-r-- 1 jin jin 4792997 May  8 13:07 ckeditor.js.map
drwxrwxr-x 2 jin jin    4096 May  8 13:07 translations

Usage

/* Before */
//import ClassicEditor from '@ckeditor/ckeditor5-build-classic';

/* After */
import ClassicEditor from '@/ckeditor5-build-classic-base64-upload-adapter/build/ckeditor.js';

image

Image Compression

npm install browser-image-compression 

Refer

/src/modules/base64uploadAdapter.js
/src/modules/imageCompressor.js
/src/ckeditor.js

About

The classic editor build of CKEditor 5 with Base64UploadAdapter


Languages

Language:JavaScript 100.0%