Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve editable API #83

Open
peyerluk opened this issue Sep 25, 2014 · 0 comments
Open

Improve editable API #83

peyerluk opened this issue Sep 25, 2014 · 0 comments
Assignees

Comments

@peyerluk
Copy link
Member

Proposed new API:

// Events:

beforeFocus: function(block) // only do as config option?
focus: function(block)
beforeBlur: function(block) // only do as config option?
blur: function(block)
selection: function(block, selection)
cursor: function(block, cursor)
empty: function(block)
move: function(block, selection, direction) // what is this again? Do we need it?
change: function(block)
stoppWriting: function(block)
insert: function(block, cursor)
split: function(firstBlock, secondBlock, cursor)
merge: function(block, cursor)
newline: function(block, cursor)
switch: function(block, cursor) // is this needed or covered with blur and focus?
paste: function(block, cursor, pastedContent)
cut: function(block)
copy: function(block, selection)

// Actions:

insertBlock: function(block, direction, cursor, callback)
splitBlock: function(block, cursor, callback)
mergeBlocks: function(block, direction, cursor, callback)
switchBlock: function(block, direction, cursor, callback)
filterPastedContent: function(block, pastedContent)
InsertNewline: function(block, cursor, callback) // only do as a config option?
// alternative naming: 
doInsert: function(block, direction, cursor, callback)
@peyerluk peyerluk self-assigned this Sep 25, 2014
@peyerluk peyerluk added task and removed feature labels Sep 25, 2014
@masone masone removed the task label Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants