Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-upload

Package Overview
Dependencies
Maintainers
1
Versions
710
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-upload

Upload feature for CKEditor 5.

  • 0.0.0-nightly-20231209.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
353K
decreased by-42.6%
Maintainers
1
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-upload?

@ckeditor/ckeditor5-upload is a plugin for CKEditor 5 that provides file upload capabilities. It allows users to upload images and other files directly within the editor, enhancing the content creation experience.

What are @ckeditor/ckeditor5-upload's main functionalities?

Simple Upload Adapter

This feature allows you to configure a simple upload adapter that sends files to a specified server endpoint. The server should handle the file storage and return the URL of the uploaded file.

ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [SimpleUploadAdapter], simpleUpload: { uploadUrl: 'https://your-upload-endpoint.com/upload' } })

Base64 Upload Adapter

This feature enables the Base64 upload adapter, which converts files to Base64 strings and embeds them directly into the content. This is useful for quick prototyping or when you don't have a server-side upload handler.

ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [Base64UploadAdapter] })

Custom Upload Adapter

This feature allows you to create a custom upload adapter by defining your own upload logic. This is useful when you need more control over the upload process or need to integrate with a specific backend service.

class MyUploadAdapter { constructor(loader) { this.loader = loader; } upload() { return this.loader.file.then(file => new Promise((resolve, reject) => { const data = new FormData(); data.append('file', file); fetch('https://your-upload-endpoint.com/upload', { method: 'POST', body: data }) .then(response => response.json()) .then(result => resolve({ default: result.url })) .catch(reject); })); } } ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [function(editor) { editor.plugins.get('FileRepository').createUploadAdapter = loader => new MyUploadAdapter(loader); }] })

Other packages similar to @ckeditor/ckeditor5-upload

Keywords

FAQs

Package last updated on 09 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc