Zefyr JSON not compatible with actual Quill DeltaDecember 3, 2020 at 5:16pm (Edited 2 years ago)
I am using ngx-quill as my editor for my Angular 2+ project and Zefyr as my Flutter mobile app. I have a problem with compatibility, the formats of both JSONs are different, Zefyr doesn't use "ops" and some names of the text formats are different, how can I fix this?
Example error: Invalid argument (No attribute with key "code-block" registered.): "code-block"
December 23, 2020 at 1:44am
About the "no attribute with key ... registered" error, I have a workaround that requires modifying Zefyr code but may cause other issues. I just make it possible to register custom attributes. This isn't a good example or anything, but it shows the gist of a solution: https://github.com/google/note-maps/commit/318aed0785c31359b563bf9008f20e5bf86732a3#diff-beca9482fc516874797567e40be4f84b0faf82c83ef5a3ac42981d87e9e8521f
There will still be issues with rendering which I don't have solutions for yet. Also, Notus/Zefyr are more consistent about how an attribute can be applied while Quill is a bit more "anything goes", but this may be less a problem if you prefer to apply attributes consistently anyway.