Skip to content

Fix text wrapping of links #1471

Open
Open
@Sub6Resources

Description

@Sub6Resources

In my case it is causing a overflow issue when links are in table cell:

Image

I´m not using any widget for test and yet it extends the link itself inside the table cell:

final List<HtmlExtension> htmlExtensions = [
    const TableHtmlExtension(),

    TagWrapExtension(
      tagsToWrap: {'a'},
      builder: (child) {
        return child;
      },
    ),
  ];

Here is how it should be displayed:

Image

I just need this TagWrapExtension, because mouse icon doesn´t change to pointer

In my html render I´m using the following code:

Html(
  data: widget.legislativeDescription,
  style: widget.htmlStyle,
  extensions: widget.htmlExtensions,
  onLinkTap: (url, _, __) async {
    if (url != null && await canLaunchUrl(Uri.parse(url))) {
      await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
    }
  },
),

Originally posted by @FoxHere in #1454 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions