flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

[QUESTION] When I use customrender. TextOverflow. The effect of ellipsis has a bug when truncating。

Open chenjiangmin opened this issue 2 years ago • 1 comments

When I use customrender. TextOverflow. The effect of ellipsis has a bug when truncating。

I want to add a click event on the span tab to handle my business. If the truncation position happens to be processed by customrender. All the words are piled up.

_customRenderCustomSpan(RenderContext context, Widget child) { return GestureDetector( onTap: () { print(context.tree.children[0].element?.innerHtml); print(context.tree.children[0].element?.attributes); }, child: child); }

image

chenjiangmin avatar Apr 30 '22 14:04 chenjiangmin

If there is a way to add click events to the span tag without using customrender, you can tell me.

chenjiangmin avatar Apr 30 '22 14:04 chenjiangmin

Unfortunately adding click events to generic tags is not on the roadmap. You'll need to use custom rendering (HtmlExtension now)

Sub6Resources avatar May 17 '23 22:05 Sub6Resources