swift - How to disable selection of parts in textView? -
imagine have text bullets.
- list item 1
- list item 2
- list item 3
how can disable selection of bullets? select text:
- list item 1
- list item 2
- list item 3
or event able select 2 paragraphs, without bullets? (like notes app). right bullets normal characters in textview , when select text, selected whitespace before them.
i have used code similar results. allows modify copied texted before added uipasteboard.
extension uitextview { override open func copy(_ sender: any?) { let gpboard = uipasteboard.general let textnew: string! textnew = self.text .replacingoccurrences(of: "\u{2022}", with: "", options: nsstring.compareoptions.literal, range:nil) gpboard.string = textnew } }
Comments
Post a Comment