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

Support the recognition of phone numbers, emails, urls and more? #1

Open
TofPlay opened this issue Jun 16, 2021 · 1 comment
Open
Labels
question Further information is requested

Comments

@TofPlay
Copy link

TofPlay commented Jun 16, 2021

It is an interesting component.
Does it support the recognition of phone numbers, emails and urls that may be in the text?
If it recognizes them will it activate the phone for a phone number, open the mail application for an email and launch Safari Mobile for a web address?
Can we add one or more regex to customize the text and associate an action if the user clicks on it?

@Iaenhaall
Copy link
Owner

Only single-word tags are supported at this time. Tags with more than one word or containing any characters besides letters or numbers are ignored and not removed.

To display a phone number, email address, or link to a website, you need to use compound HTML tags:

<a href="tel:+1-222-333-4455">+1-222-3333-4455</a>
<a href="mailto:example@mail.com">example@mail.com</a>
<a href="https://github.com/">GitHub</a>

All of this is listed in the README file. Please read it carefully.

Also note that this package uses SwiftUI 2. That means that TextView does not support any links. Maybe this can be implemented in SwiftUI 3, but I haven't tried the new versions of the software yet.

Perhaps in the future I will make this package more functional. I will let you know about it here.

@Iaenhaall Iaenhaall added the question Further information is requested label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants