Closed rxmoein closed 3 years ago
Drafty is exactly that: a platform-independent format, conceptually similar to markdown. It's currently implemented on three platforms: web (plain html + react), android, ios.
I mean making it a platform-independent package not in the tinode itself.
Drafty is written in such a way that it does depend on any other part of Tinode, it's pretty easy to split it into a separate project. My only concern would be to have too many features added to it. I want to keep it as simple and minimalistic as possible. Do you want to split it into a separate project?
I'm thinking about it as an independent rich-text format project. So the core code can be a package. It is responsible to convert content into serializable json and vice-versa. Now for each platform, we can have a plugin for it that generates the content based on that json for the target platform. For example, on the web, the destination will be HTML so it can be used easily. Or on flutter destination will be flutter widgets so it can be used as a container's child.
You are welcome to spin it off, just keep in mind that there is this: https://draftjs.org/
Is your feature request related to a problem? Please describe. Yes, currently it's highly dependent on host web objects.
Describe the solution you'd like Creating a core standard for formatting rich text content. Then provide a platform specific plugin to parse formatted data into native html element / rich text widget.