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

HTML tags support in RichText? #7311

Closed
Katarn opened this issue Dec 26, 2016 · 15 comments
Closed

HTML tags support in RichText? #7311

Katarn opened this issue Dec 26, 2016 · 15 comments

Comments

@Katarn
Copy link

Katarn commented Dec 26, 2016

Will be implemented of support of HTML-tags processing at least at the same level as that of the native TextView widget?

@Hixie
Copy link
Contributor

Hixie commented Dec 26, 2016

can you elaborate on what you want to do?

@Katarn
Copy link
Author

Katarn commented Dec 27, 2016

@Hixie I want to try to write an application with the news list, in which the text of each news will be able to handle simple tags - <a>, <b>, <i>, <strong>, <em>, <br>, <img>, <span> with inline styles support (e.g. color).

@Hixie
Copy link
Contributor

Hixie commented Dec 27, 2016

Ah, I see. You can write a simple parser which converts your input string into TextSpans, in much the same way as we do for markdown: https://github.com/flutter/flutter/tree/master/packages/flutter_markdown

I doubt we will implement true HTML support, that's a multiyear effort for hundreds of people with no end in sight.

@Katarn
Copy link
Author

Katarn commented Dec 27, 2016

@Hixie thanks for answering!

@eseidelGoogle
Copy link
Contributor

eseidelGoogle commented Dec 27, 2016

I suspect someone will write a small pub package to do some of this. I know that others have already forked flutter_markdown to add some html support, or at least discussed doing so in gitter.im/flutter/flutter. @olostan might know.

@olostan
Copy link

olostan commented Dec 27, 2016

Yes, as I had to implement quick-and-dirty solution, I didn't extracted into separate pub package, but if you interested, I can quickly do.

Until then, you can just copy this folder to your app and use it :)

@Katarn
Copy link
Author

Katarn commented Dec 27, 2016

@olostan Thanks, I'll try your solution! So far, a separate package do not need me, I'm just studying the possible tools and frameworks for write my amateur app. :)

@Katarn
Copy link
Author

Katarn commented Dec 30, 2016

Hi guys. I did the necessary me widget, but I found a very serious limitation of the framework - all ListItems have a fixed height. In general, I understand that the framework is still very young. I will follow his further development.

If you're curious, here's what I got: https://gist.github.com/Katarn/588725dce850c81da8a551f92fb0923a. It is my first application on the Dart. :) Suffice it to replace this file main.dart file in any flutter application - in its all-inclusive for the successful launch demo application.

You can close this issue, if you think that the framework for such a widget is not required. For me, this issue has been resolved.

@eseidelGoogle
Copy link
Contributor

This has come up before. ListItem should probably be renamed MaterialListItem (or template?) and add some documentation explaining that it's fixed height because that's what the Material spec says to do. :) https://docs.flutter.io/flutter/material/ListItem-class.html

I believe https://docs.flutter.io/flutter/widgets/LazyBlock-class.html is the alternative list you want. @Hixie I'm sure will correct me if I'm wrong. :)

@eseidelGoogle
Copy link
Contributor

Filed #7318 to track improving docs/naming.

@Katarn
Copy link
Author

Katarn commented Dec 30, 2016

@eseidelGoogle thanks, I'll try this widget after holidays. It supports the scroll position indicator?

@eseidelGoogle
Copy link
Contributor

My understanding is that scrollbars do not work today (#5525) but @Hixie is in the process of adding them as part of his grand scrolling refactor: https://github.com/flutter/flutter/projects/3

@Hixie
Copy link
Contributor

Hixie commented Feb 27, 2017

Not clear what to do for this bug. We do not intend to ever support HTML directly though.

@Hixie
Copy link
Contributor

Hixie commented Mar 7, 2018

WebView is #730

amirh pushed a commit to amirh/flutter that referenced this issue Dec 28, 2018
```
f0a1d6f Roll src/third_party/skia 487132b82826..acc763e8795c (1 commits) (flutter#7318)
f0dd643 Recreate the overlay rendering surfaces if the GrContext was changed. (flutter#7317)
245317a  Reland "Only reject gestures to embedded UIViews when the framework sa (flutter#7315)
be69b07 Roll src/third_party/skia d2fa2eb59f2d..487132b82826 (1 commits) (flutter#7314)
732ea76 Allow dynamic patches without a patch number. (flutter#7309)
20ee4e3 Revert "Only reject gestures to embedded UIViews when the framework says so. (flutter#7307)" (flutter#7313)
28e152f Roll src/third_party/skia cae020ae5f5f..d2fa2eb59f2d (3 commits) (flutter#7312)
7c65290 Roll src/third_party/skia 31c1bf89657f..cae020ae5f5f (1 commits) (flutter#7311)
180d8a7 Roll src/third_party/skia f6e963ef91c2..31c1bf89657f (1 commits) (flutter#7310)
cc9c670 Only reject gestures to embedded UIViews when the framework says so. (flutter#7307)
2fb2b27 Roll src/third_party/skia 3605fde88b2a..f6e963ef91c2 (1 commits) (flutter#7306)
```
amirh added a commit that referenced this issue Dec 28, 2018
```
f0a1d6f Roll src/third_party/skia 487132b82826..acc763e8795c (1 commits) (#7318)
f0dd643 Recreate the overlay rendering surfaces if the GrContext was changed. (#7317)
245317a  Reland "Only reject gestures to embedded UIViews when the framework sa (#7315)
be69b07 Roll src/third_party/skia d2fa2eb59f2d..487132b82826 (1 commits) (#7314)
732ea76 Allow dynamic patches without a patch number. (#7309)
20ee4e3 Revert "Only reject gestures to embedded UIViews when the framework says so. (#7307)" (#7313)
28e152f Roll src/third_party/skia cae020ae5f5f..d2fa2eb59f2d (3 commits) (#7312)
7c65290 Roll src/third_party/skia 31c1bf89657f..cae020ae5f5f (1 commits) (#7311)
180d8a7 Roll src/third_party/skia f6e963ef91c2..31c1bf89657f (1 commits) (#7310)
cc9c670 Only reject gestures to embedded UIViews when the framework says so. (#7307)
2fb2b27 Roll src/third_party/skia 3605fde88b2a..f6e963ef91c2 (1 commits) (#7306)
```
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this issue Feb 12, 2019
```
f0a1d6f Roll src/third_party/skia 487132b82826..acc763e8795c (1 commits) (flutter#7318)
f0dd643 Recreate the overlay rendering surfaces if the GrContext was changed. (flutter#7317)
245317a  Reland "Only reject gestures to embedded UIViews when the framework sa (flutter#7315)
be69b07 Roll src/third_party/skia d2fa2eb59f2d..487132b82826 (1 commits) (flutter#7314)
732ea76 Allow dynamic patches without a patch number. (flutter#7309)
20ee4e3 Revert "Only reject gestures to embedded UIViews when the framework says so. (flutter#7307)" (flutter#7313)
28e152f Roll src/third_party/skia cae020ae5f5f..d2fa2eb59f2d (3 commits) (flutter#7312)
7c65290 Roll src/third_party/skia 31c1bf89657f..cae020ae5f5f (1 commits) (flutter#7311)
180d8a7 Roll src/third_party/skia f6e963ef91c2..31c1bf89657f (1 commits) (flutter#7310)
cc9c670 Only reject gestures to embedded UIViews when the framework says so. (flutter#7307)
2fb2b27 Roll src/third_party/skia 3605fde88b2a..f6e963ef91c2 (1 commits) (flutter#7306)
```
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants