flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

Feature parity between Html and SelectableHtml

Open jhass opened this issue 4 years ago • 9 comments

#169 got closed through #682 introducing a SelectableHtml with a feature subset currently achievable with Flutter's support level. Reaching feature parity is blocked by https://github.com/flutter/flutter/issues/38474, but once this is resolved it would be nice to have a full implementation.

jhass avatar Jun 01 '21 09:06 jhass

Yep, that is the plan once the Flutter issue is closed. #632 adds customRender back for SelectableHtml.

tneotia avatar Jun 01 '21 09:06 tneotia

Alright, the Flutter PR adding support for widget span in editable text has been merged. We can't use it quite yet in the SelectableText (it's just a matter of removing an assert from the framework) but hopefully this should be coming soon and I will experiment with it. Currently they are working on how they want to do clipboard support.

tneotia avatar Jul 23 '21 12:07 tneotia

We merged custtomRender support for SelectableHtml already into master and you can test it using flutter_html 3.0.0-alpha.2. There is no out-of-the-box feature parity though (notably images are not yet supported).

erickok avatar Jan 18 '22 08:01 erickok

So this version doesn’t yet support images? Is that due to a flutter level bug still or something else?

dan1229 avatar Jan 18 '22 16:01 dan1229

Correct, I experimented with the widget span support inside of selectable html, but there are quite a few issues with it that currently are still game-breaking. We could potentially support very simple use cases like images, videos, or audio, but any sort of container based formatting will still not be supported.

tneotia avatar Jan 18 '22 16:01 tneotia

@erickok, I believe this is resolved in the latest flutter version, as https://github.com/flutter/flutter/issues/38474 is now closed. Is that correct?

Sub6Resources avatar Jun 10 '22 17:06 Sub6Resources

We would need to explicitly add support for this in the package though. I experimented with it a few months back and it completely breaks text copy paste, so as I said in the previous comment container-based formatting should still not be supported.

tneotia avatar Jun 10 '22 17:06 tneotia

Yes we can give it another go. Perhaps with Flutter 3 it is mature enough.

erickok avatar Jun 10 '22 18:06 erickok

Any progress on this? Now that flutter has fixed the issue?

vanlooverenkoen avatar Jul 11 '22 11:07 vanlooverenkoen