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

@ckeditor/ckeditor5-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
705
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-clipboard

Clipboard integration for CKEditor 5.

  • 17.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
654K
increased by3.7%
Maintainers
1
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-clipboard?

@ckeditor/ckeditor5-clipboard is a plugin for CKEditor 5 that provides clipboard support, enabling users to cut, copy, and paste content within the editor. It handles various clipboard operations, including pasting plain text, HTML, and rich text content, and integrates seamlessly with other CKEditor 5 plugins.

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

Basic Clipboard Operations

This code initializes a CKEditor 5 instance with the clipboard plugin enabled, allowing basic cut, copy, and paste operations.

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

Pasting Plain Text

This configuration ensures that only plain text is pasted into the editor, stripping out any HTML or rich text formatting.

ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Clipboard ], clipboard: { plainText: true } })

Handling Custom Paste Events

This example demonstrates how to handle custom paste events by listening to the 'inputTransformation' event, allowing developers to manipulate the pasted content before it is inserted into the editor.

ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Clipboard ] }).then(editor => { editor.plugins.get('Clipboard').on('inputTransformation', (evt, data) => { console.log('Custom paste event:', data); }); });

Other packages similar to @ckeditor/ckeditor5-clipboard

Keywords

FAQs

Package last updated on 20 Feb 2020

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