New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

editorjs-drag-drop

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorjs-drag-drop - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

5

CHANGELOG.md
# Changelog
## 1.1.7 (12.09.2022)
* Add OpenSSF BestPractices & Scorecard badges
* Add CDN version documentation
## 1.1.6 (23.08.2022)

@@ -4,0 +9,0 @@

2

package.json
{
"name": "editorjs-drag-drop",
"version": "1.1.6",
"version": "1.1.7",
"keywords": [

@@ -5,0 +5,0 @@ "drag",

@@ -0,5 +1,6 @@

# EditorJS Drag/Drop Plugin
![](https://badgen.net/badge/Editor.js/v2.0/blue)
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/6468/badge)](https://bestpractices.coreinfrastructure.org/projects/6468)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-drag-drop/badge)](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-drag-drop)
# EditorJS Drag/Drop Plugin
Drag/Drop feature for [Editor.js](https://editorjs.io).

@@ -25,2 +26,12 @@

### Load from CDN
You can load a specific version of the package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/editorjs-drag-drop).
Require this script on a page with Editor.js.
```html
<script src="https://cdn.jsdelivr.net/npm/editorjs-drag-drop"></script>
```
## Usage

@@ -50,3 +61,3 @@

If you are using React, you could create a function to handle the onReady property, the function will store the DragDrop instance. Then, you must call the function in onReady in the editorJS instance.
If you are using React, you could create a function to handle the onReady property, the function will store the DragDrop instance. Then, you must call the function in onReady in the editorJS instance.

@@ -86,19 +97,19 @@ ```javascript

const editorCore = React.useRef(null)
const handleInitialize = React.useCallback((instance) => {
editorCore.current = instance
}, [])
const handleReady = () => {
const editor = editorCore.current._editorJS;
const editor = editorCore.current._editorJS;
new Undo({ editor })
new DragDrop(editor);
};
const ReactEditorJS = createReactEditorJS()
return(
<ReactEditorJS
<ReactEditorJS
onInitialize={handleInitialize}
onReady = {handleReady}
tools={....}
tools={....}
defaultValue={....}

@@ -105,0 +116,0 @@ />

Sorry, the diff of this file is not supported yet

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