If there is a table or block of code,.textSelection(.enabled) only copies some (truncated by the code or table) when copying, can it be optimized? #224
-
If there is a table or block of code,.textSelection(.enabled) only copies some (truncated by the code or table) when copying, can it be optimized? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @wscqs, The If you want more control over the text that gets copied, you must implement your own copy button. You can use the styling API to access the contents of a specific block (see #215 and #220). There are more details in this discussion: #201. |
Beta Was this translation helpful? Give feedback.
Hi @wscqs,
The
textSelection(_:)
modifier in SwiftUI selects the text on a specificText
view. Since aMarkdown
view has multipleText
views, for instance, one per paragraph, code block, or table cell, we cannot change that behavior.If you want more control over the text that gets copied, you must implement your own copy button. You can use the styling API to access the contents of a specific block (see #215 and #220). There are more details in this discussion: #201.