how to text.append() a Hyperlink to TextEditor Swiftui

329 Views Asked by At

I have a TextEditor that i want to add a clickable Hyperlink using the TextEditor text.append()

TextEditor(text: $textE)
                    .textFieldStyle(.roundedBorder)

textE.append(contentsOf: "\n" + LINK......)

1

There are 1 best solutions below

3
JonathanLiu On

I believe you have to use markdown to achieve hyperlink in text.

Text("Hello! Example of a markdown with a link [example](https://example.com)")

This question may be useful for you about how to use uitextview