singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.59k stars 836 forks source link

Pasting paragraph with links doesn't linkify #1432

Closed jezell closed 1 year ago

jezell commented 1 year ago

If you paste a link directly, it gets linkified. However, if you paste a larger amount of text which contains links in the middle, the links in the text don't get linkified.

singerdmx commented 1 year ago

The logic is using regex to recognize the string

jezell commented 1 year ago

@singerdmx yes, but the regex doesn't seem to be applying properly against parts of the text. For example, pasting: "this is a test https://www.google.com" doesn't get linkified, but pasting "https://www.google.com" does

mboyamike commented 1 year ago

Is there a way to modify the regex that is exposed by the API?

EchoEllet commented 1 year ago

Is there a way to modify the regex that is exposed by the API?

Hi, I will look into that and if not I will add it as feature

EchoEllet commented 1 year ago

If you paste a link directly, it gets linkified. However, if you paste a larger amount of text which contains links in the middle, the links in the text don't get linkified.

Issue fixed and I also will provide a way to override the regex

EchoEllet commented 1 year ago

The logic is using regex to recognize the string

The last PR should fix this issue, closing it to focus on other issues.

mboyamike commented 1 year ago

Thank you @freshtechtips

EchoEllet commented 1 year ago

Thank you @freshtechtips

You are welcome

EchoEllet commented 1 year ago

If you paste a link directly, it gets linkified. However, if you paste a larger amount of text which contains links in the middle, the links in the text don't get linkified.

You can try the latest version:

flutter_quill: ^7.4.15

it should be fixed

EchoEllet commented 1 year ago

If you paste a link directly, it gets linkified. However, if you paste a larger amount of text which contains links in the middle, the links in the text don't get linkified.

Can you close this issue as fixed?

singerdmx commented 1 year ago

@freshtechtips I will make you collaborator so you can directly close