Skip to content
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

Text Links don't wrap. #40

Closed
peekpt opened this issue Nov 24, 2018 · 7 comments
Closed

Text Links don't wrap. #40

peekpt opened this issue Nov 24, 2018 · 7 comments

Comments

@peekpt
Copy link

peekpt commented Nov 24, 2018

Text Links have a line break before the underlined blue text and the underlined blue text link doesn't wrap to the next line as it should.

captura de ecra 2018-11-24 as 19 44 43

@romatroskin
Copy link

romatroskin commented Dec 10, 2018

Have the same weird issue, and can't figure out why it's happens, but seems like it happens when "a" is wrapped in "p", and it happens even if you replace "a" with a customRender and put there just a Text widget :( @Sub6Resources any ideas?

@Sub6Resources
Copy link
Owner

This is the same issue as #17 actually. There is a fix in the works, so follow that issue for updates.

@peekpt
Copy link
Author

peekpt commented Dec 10, 2018 via email

@Sub6Resources
Copy link
Owner

Yes, that's correct, and that is the solution I'll probably end up using for the normal parser.

@peekpt
Copy link
Author

peekpt commented Dec 10, 2018 via email

@Sub6Resources
Copy link
Owner

#17 as well as this issue have been resolved. Use the useRichText parameter to make text links render correctly.

@lukepighetti
Copy link
Contributor

This issue does not appear to be resolved.

Html(
          data: content,
          onLinkTap: (url) => launch(url),
          blockSpacing: 8,
          defaultTextStyle: TextStyle(fontSize: 16),
          renderNewlines: true,
          useRichText: false,
          customRender: (node, __) {
            if (node is Element) {
              switch (node.className) {
                case "invisible":
                  return Container();
                case "ellipsis":
                  return null;
                case "mention":
                  return null;
                case "hashtag":
                  return null;
              }
            }
          },
          linkStyle: TextStyle(
            fontSize: 16,
            fontWeight: FontWeight.w500,
            color: Theme.of(context).primaryColor,
          ),
        ),

richText = false
img_2186

richText = true
img_5e44cd56b6ce-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants