visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
280 stars 44 forks source link

Controller - Move DocumentController in EditorController #222

Closed adrian-moisa closed 1 year ago

adrian-moisa commented 1 year ago

The article subscribes to the initialization process and receives the default synchronized article. Now, it wants to update the VE (Visual Editor) controller. To perform the update, it needs the documentController. The documentController is created during the initialization of the VE widget. The VE widget is created when the article page triggers the build process, including the articleOk state store emit (the second emitted state). The build process, along with the visible VE, occurs after the article subscription initially emits the default values in sync. In other words, we are trying to update the documentController that the VE internally assumes to be available, even though we haven't created the VE widget yet, which creates the document controller.

In short, we want to update a document using a document controller before the document controller is created.

adrian-moisa commented 1 year ago

I believe this was fixed in #228