menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Zefyr

Zefyr rich text editor for Flutter applications

Channels
Team

How to add inline embed into editor, like mention?

September 17, 2020 at 5:59am

How to add inline embed into editor, like mention?

September 17, 2020 at 5:59am

September 18, 2020 at 5:43pm
Inline embeds are not yet supported. Previously this was blocked by the underlying implementation of RichText in Flutter, but they since added a WidgetSpan which should allow us to implement this now.
As for mentions I thought they were closer to the regular link attribute but with an autocomplete popup dialog. Any particular reason you thought of implementing them as inline embeds?
The difference would be, for instance, if it was an embed then it can only be modified or deleted as a whole.
E.g. pressing "Delete" key when the caret is at the end of a embedded mention would delete the entire mention. If it was just an inline style then "Delete" would only remove the last character.