Browse Source

Update Droppable endCustom

pull/3905/head
Artur Arseniev 4 years ago
parent
commit
e2dc28f757
  1. 16
      docs/modules/Blocks.md
  2. 2
      src/utils/Droppable.js

16
docs/modules/Blocks.md

@ -315,18 +315,20 @@ const editor = grapesjs.init({
editor.on('block:custom', props => {
// The `props` will contain all the information you need in order to update your UI.
// props.open (boolean) - Indicates if the Asset Manager is open
// props.assets (Array<Asset>) - Array of all assets
// props.types (Array<String>) - Array of asset types requested, eg. ['image'],
// props.close (Function) - A callback to close the Asset Manager
// props.remove (Function<Asset>) - A callback to remove an asset
// props.select (Function<Asset, boolean>) - A callback to select an asset
// props.container (HTMLElement) - The element where you should append your UI
// props.blocks (Array<Block>) - Array of all blocks
// props.dragStart (Function<Block>) - A callback to trigger the start of block dragging.
// props.dragStop (Function<Block>) - A callback to trigger the stop of block dragging.
// props.container (HTMLElement) - The default element where you can append your UI
// Here you would put the logic to render/update your UI.
});
```
Here an example of using custom Block Manager with a Vue component.
<demo-viewer value="wbj4tmqk" height="500" darkcode/>
## Events

2
src/utils/Droppable.js

@ -70,7 +70,7 @@ export default class Droppable {
}
endCustom(cancel) {
this.endDrop(cancel);
this.over ? this.endDrop(cancel) : this.__customTglEff(false);
}
endDrop(cancel, ev) {

Loading…
Cancel
Save