3.22.0 • Published 1 year ago

@samhammer/ckeditor5-simple-image-upload-plugin v3.22.0

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

ckeditor5-simple-image-upload-plugin

npm version

A generic ckeditor plugin to upload images with a custom api backend.

Features

  • Simple UploadAdapter to upload files with a custom backend.

How to use

To be able to use this plugin you need a custom build of ckeditor.

Further instructions can be found here: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html

Installation:

npm i @samhammer/ckeditor5-simple-image-upload-plugin

Configuration

This plugin uses a hook which can be configured like shown below. This hook is called with the JS-File-Object as parameter and has to return a Promise which resolves to the full URL of the uploaded image.

Example:

InlineEditor
	.create( editorElement, {
        simpleImageUpload: {
            onUpload: file => {
                // do any upload stuff here with the JS-File-Object
                return Promise.resolve("http://path/to/the/uploaded/image.jpg");
            },
            onAbort: () => { // OPTIONAL
                // abort the upload here. The promise from onImageUpload should be rejected after that.
            }
        }
	} )
	.then( ... )
	.catch( ... );

How to publish

For publishing an npm account that is referenced to the organization is required.

See the following how to:

https://docs.npmjs.com/getting-started/publishing-npm-packages

If everything is configured correctly just count up the version number in our package.json and execute one of the following commands:

npm publish --access public

License

ckeditor5-simple-image-upload-plugin is released under the MIT License. See LICENSE file for details.

3.22.0

1 year ago

3.21.0

2 years ago

3.20.0

2 years ago

3.19.0

2 years ago

3.18.0

2 years ago

3.17.0

3 years ago

3.16.0

3 years ago

3.15.0

3 years ago

3.14.0

3 years ago

3.13.0

3 years ago

3.12.0

3 years ago

3.11.0

3 years ago

3.10.0

4 years ago

3.9.0

4 years ago

3.8.0

4 years ago

3.7.0

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

4 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago