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

Use SelectableText - Selectable content #169

Closed
franvera opened this issue Oct 2, 2019 · 29 comments · Fixed by #682
Closed

Use SelectableText - Selectable content #169

franvera opened this issue Oct 2, 2019 · 29 comments · Fixed by #682
Assignees
Labels
enhancement New feature or request medium-priority

Comments

@franvera
Copy link

franvera commented Oct 2, 2019

Would it be possible to implement the https://api.flutter.dev/flutter/material/SelectableText-class.html#material.SelectableText.2 widget as a parent?

It appears the constructor SelectableText.rich can be useful for this.

@Sub6Resources
Copy link
Owner

That's definitely a possibility, though this will probably only be helpful for a small subset of users, so it would default to a normal RichText with some sort of boolean parameter that makes the text selectable.

I'll look into adding this soon.

@Sub6Resources Sub6Resources added enhancement New feature or request medium-priority labels Oct 7, 2019
@Sub6Resources Sub6Resources self-assigned this Oct 7, 2019
@Sub6Resources Sub6Resources added this to the Goals milestone Oct 7, 2019
@franvera
Copy link
Author

franvera commented Oct 8, 2019

@Sub6Resources I agree, a boolean parameter would be great 😁Thank you for all your work!

This was referenced Dec 12, 2019
@bekchan
Copy link

bekchan commented Jan 21, 2020

Any news on this feature? I really need it.

@gzlock
Copy link

gzlock commented Jan 31, 2020

Yep, I need it too

@GeertJohan
Copy link
Contributor

GeertJohan commented Feb 4, 2020

I can implement this. @Sub6Resources Can we have a quick brainstorm/discussion on the tech design? I'd like to know how you'd prefer this to be implemented, especially with the new styling approach. I'm on gitter.im or maybe you can suggest an outline in this thread?

@qingant
Copy link

qingant commented Feb 10, 2020

Any news on this feature? I really need it.

@Sub6Resources
Copy link
Owner

Sub6Resources commented Feb 11, 2020

Quick update on the SelectableHtml widget:

@GeertJohan and I have been discussing this feature. We discovered that SelectableText.rich() requires that all the elements passed into it be TextSpans. Unfortunately, flutter_html makes use of WidgetSpans in addition to the regular TextSpans. I'm working on opening an issue on the main Flutter repository to potentially resolve this, but in the meantime we're looking into allowing Html snippets that don't make use of WidgetSpans (i.e. basic inline styled elements without customRender) to be made selectable using the SelectableHtml.

tl;dr: This is difficult at the moment due to limitations in the Flutter SelectableText framework, so we're currently looking at building the SelectableHtml widget for only very simple Html snippets.

@softmarshmallow
Copy link

Looking forward to it!

@sp213
Copy link

sp213 commented Mar 1, 2020

I'm looking forward to it too! Really appreciated for this excellent plugin! 💯

@GeertJohan
Copy link
Contributor

I'm not yet implementing this feature because it will have almost no effect for me, I need links to work and found out that clickable elements don't work with SelectableText.rich().

See flutter/flutter#43494

Once this has been resolved, I can properly work on a SelectableHtml that works for simle html.

@nicholasgerard
Copy link

@GeertJohan @Sub6Resources Looks like this is fixed on flutter/dev. I'm happy to help with the implementation/design if needed.

@Sub6Resources
Copy link
Owner

@nicholasgerard It looks like the issue was closed but I don't see any PRs that mention where the change was made. Do you see something I'm not?

@nicholasgerard
Copy link

@Sub6Resources Sorry I meant flutter/master, it hasn't landed on dev yet:

flutter/flutter#54479

@softmarshmallow
Copy link

how is it going on? flutter now supports selectable text

@Sub6Resources
Copy link
Owner

Sub6Resources commented Apr 24, 2020

This feature will take some time to roll to stable. There are also other blocking issues in the flutter framework right now that prevent most HTML from being made selectable and will slow down this feature considerably. Unfortunately it's not as trivial as switching out a RichText() for a SelectableText.rich()

@RyanSusana
Copy link

Can this be resolved with the new Flutter Stable?

@lianfanghua
Copy link

Any news? Is this feature implemented in v1.0.0?

@sp213
Copy link

sp213 commented May 14, 2020

Still looking forward to it too!

@ynsmtkl
Copy link

ynsmtkl commented May 20, 2020

Still waiting also for this

@GeertJohan
Copy link
Contributor

GeertJohan commented May 24, 2020

Please be kind and use emoji's or watch this issue instead of posting "Please build this" etc. messages. Those kind of messages are only spamming the thread.

jnthnklvn added a commit to jnthnklvn/flutter_html that referenced this issue Jul 23, 2020
@rodrigorafaeldamaceno
Copy link

something news about this issue?

@droplet-js
Copy link

We can refer to zefyr

@aleksandr-plujnik
Copy link

another option: use flutter_markdown + html2md. works for me (html rich messages for chatting)

@kubaprzetakiewicz
Copy link

kubaprzetakiewicz commented Mar 22, 2021

What's the status right now - is this being actively worked on or do you welcome PRs?

@erickok
Copy link
Collaborator

erickok commented Mar 22, 2021

There is no active development in this. PRs are always welcome, especially if they are concise and backward compatible.

@erickok
Copy link
Collaborator

erickok commented Apr 29, 2021

To be clear, this is blocked on a Flutter issue flutter/flutter#38474

@jhass
Copy link

jhass commented May 31, 2021

Thanks, that's some progress! However, should we open a new issue to track feature parity between Html and SelectableHtml?

@erickok
Copy link
Collaborator

erickok commented Jun 1, 2021

Yes, they can be opened in separate issue. Though as mentioned above flutter/flutter#38474 likely precludes us from fixing said issues.

@dan1229
Copy link

dan1229 commented Dec 28, 2021

Any update on this? Would love to use the SelectableHtml widget but it can't even display images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.