P E N C I L
Login
Migration from 0.33 => 0.42

Event handlers

Old:
onKeyDown= (event) {
  return
}

New:
onKeyDown = (event, change, next) => {
  if (isHotKey) {
     event.preventDefault();
     editor.domeSomething();
     return;
  }  
  next()
}

Plugin def:
-----------
{
 commands: {
     toggleBold(editor) {
                editor.toggleMark(BOLD);
            },
 }
}To change: editor.toggleBold()

Render

Old:

 renderNode(props) {
    if (..) {
       return node;
    } else {
       return;
    }
 }

 renderNode(props, editor, next) {
    if (...) {        return node;    } else {
        return next();
    }
 }

-