
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
editorjs-drag-drop
Advanced tools
Drag/Drop feature for Editor.js.
Get the package
$ npm i --save-dev editorjs-drag-drop
Include module at your application
import DragDrop from 'editorjs-drag-drop';
const editor = new EditorJS({
onReady: () => {
new DragDrop(editor);
},
});
Select the block, drag the toolbar settings button and drop it at the desired position.
If you're already using editorjs-undo, then your code will look somewhat like this:
const editor = new EditorJS({
onReady: () => {
new Undo({ editor });
new DragDrop(editor);
},
});
If you are using react-editor-js, 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.
const handleReady = (editor) => {
new DragDrop(editor);
};
class ReactEditor extends Component {
render() {
return (
<EditorJs
onReady = { handleReady }
tools = { ... }
/>
)
}
}
Note: If you are already using editorjs-undo your handleReady function must have the editorjs-undo instance.
const handleReady = (editor) => {
new Undo({ editor });
new DragDrop(editor);
};
Development mode
$ yarn build:dev
Production release
$ yarn build
dist/bundle.js
Run tests
$ yarn test
We welcome everyone to contribute. Make sure you have read the CODE_OF_CONDUCT before.
For information on how to contribute, please refer to our CONTRIBUTING guide.
Features and bug fixes are listed in the CHANGELOG file.
This library is licensed under an MIT license. See LICENSE for details.
Made with 💙 by kommitters Open Source
1.0.1 (10.12.2021)
FAQs
Drag and Drop feature for Editor.js
The npm package editorjs-drag-drop receives a total of 30,521 weekly downloads. As such, editorjs-drag-drop popularity was classified as popular.
We found that editorjs-drag-drop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.