Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 860 forks source link

[QUESTION] How to copy HTML code or range via text selection #1299

Closed niicolasalves closed 1 year ago

niicolasalves commented 1 year ago

Hello friends, I need to assemble a text marker using flutter_html, basically the user selects a text area, the SelectionArea captures the text part and I add a span around the text. The marker works. But the problem is that if the user marks a word or phrase that is repeated throughout the text, he will mark it several times. I need it to be just in the region he selected.

Then I ask: is there any possibility of copying the HTML code via SelectionArea or SelectableHtml or knowing the range (beginning and end of the markup)?

Grateful!!

Sorry for my English, I translated the message.

Sub6Resources commented 1 year ago

We no longer support SelectableHtml, so you'll need to check with Flutter's support regarding SelectionArea for something like this.