Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

poc for widget delete #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

poc for widget delete #43

wants to merge 1 commit into from

Conversation

michelson
Copy link
Owner

@michelson michelson commented Feb 8, 2017

This is a proof of concept for Widget Deletion.
it assumes a custom configuration where handleDelete option is provided for the widget. This test adds a debugger on the callback for testing purposes. I've to think about the design for this implementation on how will be configured. But the main idea is to check on del or backspace event for widgets that handle deletion and execute it's callback.
The callback function provides the editor context and the current block which is deleted.

handleDelete(ctx, block){
     var url = block.toJS().data.url
     // do your ajax DELETE 
},

issue ref: #23

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant