Closed adrian-moisa closed 2 years ago
We had several issue to fix along the way related to: https://github.com/visual-space/visual-editor/issues/77 . Also had to deal with a modification in the EditorController
code. Added in the update()
command a new optional parameter to ignoreFocus
. Basically when you update the document you can request for the caret not to be placed. It was necessary especially when dispatching update commands from the controller of the json input. Without this parameter the editor was always recapturing focus thus robbing the json input from the opportunity to insert changes in the document raw json.
Now it finally works with some minor issues. However one caveat is that a bad json wont update the editor. It might feel as if the page is broken. In future we could improve by adding a warning to indicate the json format is corrupted.
During development, it's often times super helpful to have a page that previews the the delta content of a document.