-
-
Notifications
You must be signed in to change notification settings - Fork 876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove underline from image link? #312
Comments
@lucien144 Nice catch. That definitely is not intended. I'll see if I can get working on that sometime this week. |
@lucien144 I've had to stop work on this for the day due to time limitations but I'll see if I can continue to work on this tomorrow. I'm getting somewhat close, but it is still definitely a WIP. |
@ryan-berger Amazing, thanks! I found a workaround for now by adding custom class on the link that I style using the String _tagAllImageLinks(String source) {
Document document = parse(source);
document.querySelectorAll('a > img').forEach((Element el) {
el.parent.classes.add('image-link');
});
return document.body.innerHtml;
} Html(
data: source,
style: {
".image-link": Style(textDecoration: TextDecoration.none)
}
); |
Thanks for the workaround. A solution within flutter_html would be great. @ryan-berger What's the status of the pull request? :) |
Html( This style works for me well. Thank you |
@XingtianXin But that removes underline from all links, not image links only, no? |
Is there any way how to remove the underline from image wrapped in anchor but keep text links underlined?
Example:
Thanks.
The text was updated successfully, but these errors were encountered: