matrix-org / matrix-rich-text-editor

Matrix Rich Text Editor
https://matrix-org.github.io/matrix-rich-text-editor/
Apache License 2.0
84 stars 20 forks source link

Render AST/model directly to iOS AttributedString #874

Open stefanceriu opened 8 months ago

stefanceriu commented 8 months ago

To improve performance by reducing the amount of data mapping. To improve maintainability by removing the need to map selection indices between the different model formats (AST / HTML / AttributedString)

Would fix https://github.com/vector-im/element-x-ios/issues/2030 and https://github.com/vector-im/element-ios/issues/7489

Velin92 commented 8 months ago

Btw another easier fix for the meantime to help with https://github.com/vector-im/element-x-ios/issues/2030 and https://github.com/vector-im/element-ios/issues/7489 would be to try the following solution found by @stefanceriu to intercept that a text to speech is happening: https://stackoverflow.com/questions/32652775/ios-how-to-detect-if-voice-dictation-was-used-for-uitextfield-or-microphone-bu/53440078#53440078

Maybe we could use this to avoid using the diffing system until we are sure that the user has ended the dictation?