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

Selectable text not working #2

Closed
TheBestMoshe opened this issue Apr 17, 2020 · 7 comments
Closed

Selectable text not working #2

TheBestMoshe opened this issue Apr 17, 2020 · 7 comments
Labels
invalid This doesn't seem right

Comments

@TheBestMoshe
Copy link

When I dig into the code, it seems like the text is set to be selectable by default, however, the generated code is just RichText widget and not a SelectableText.rich widget.

Can we get proper support for selectable text, and as a bonus, if we can pass in toolbarOptions that would be even better.

@asjqkkkk
Copy link
Owner

Hi,
SelectableText.rich only supports TextSpan, but some tag widgets are made up of WidgetSpan, So I can only use SelectableText

Now v1.0.8 supports whether to enable selectable in PConfig 😄

@TheBestMoshe
Copy link
Author

Now v1.0.8 supports whether to enable selectable in PConfig

Thanks! This fits my primary use case.

SelectableText.rich only supports TextSpan, but some tag widgets are made up of WidgetSpan, So I can only use SelectableText

Is this why selections can't go between strong (bold) and regular text within the <p> tags?

@asjqkkkk
Copy link
Owner

Is this why selections can't go between strong (bold) and regular text within the <p> tags?

yes, if SelectableText.rich supports WidgetSpan ,this issue will be solved

@asjqkkkk
Copy link
Owner

Hi, use v1.3.0, and you can select all text
image

@Shreedhar73
Copy link

Shreedhar73 commented Nov 17, 2023

@asjqkkkk
Hey, amazing package thanks.

I am facing a problem ( it might be an expected behaviour ).
Initially , I selected multi lines of text with different tags( headings, lists) and copy the selected text.
When i pasted the text elsewhere, the formatting is not being maintained.

Can you please look into this?

@asjqkkkk
Copy link
Owner

Hi @Shreedhar73 , currently, the markdown_widget utilizes SelectionArea to implement the copy function. Indeed, it has the issue you mentioned. It may be necessary to explore whether there can be extensions in this regard in the future to see how to achieve the effect you described.
At the same time, you can also keep an eye on this issue: flutter/flutter#104548

@Shreedhar73
Copy link

@asjqkkkk Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants