daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
645 stars 242 forks source link

The onTapImage event can't get the href attribute of an image. #1337

Closed miaoquanlong closed 2 months ago

miaoquanlong commented 2 months ago

data:{ "content": "

emall组织架构及基本信息_20230727.pdf

\n

","appContent":"

app尚硅谷大数据之flink教程.pdf

","effectStartTime":"2024-09-10 10:39:51","effectEndTime":null,"effectStatus":"EFFECTING","seqNo":1,"publicType":1,"longTimeFlag":true,"createdTime":"2024-09-10 10:39:51","modifiedTime":"2024-09-10 10:54:15","helpCenterArticlePicDetailResDTOList":null}}}

image HtmlWidget( appMsgContent, onTapImage: (imageMetadata) { print(imageMetadata); },) Can't the click event of an image get the href attribute of the a tag?

miaoquanlong commented 2 months ago
    "appContent": "<p>app<img class=\"wscnph\" style=\"max-width: 100%;\" src=\"https://dev-docs.etc-parts.com/info/tinymce/10000/1725935907236_1030831752003457024.jpg!no-water-mark\" /><a id=\"pdf-1030831895222161408\" href=\"https://dev-pdocs.etc-parts.com/purchaseAgreement/10000/1030831895217967105.pdf?Expires=1725940272&OSSAccessKeyId=LTAIsilTtgEYOrJE&Signature=AgYLQOHfR77NeT7eDiVdA9Yhh%2FY%3D\" target=\"_blank\" rel=\"noopener\">aa.pdf</a></p>", Updated data