KeyboardKit / KeyboardKitPro

KeyboardKit Pro helps you create custom keyboards for iOS and iPadOS.
https://keyboardkit.com
Other
114 stars 8 forks source link

Using selectedText to capture the a selected text in a document without truncating it #15

Open anonys opened 2 months ago

anonys commented 2 months ago

is there a way to surpass the limitation of selectedText() when the text selection is beyond 2 lines.

danielsaidi commented 2 months ago

Hi @anonys

Apple's APIs are really restricted when it comes to accessing text from the proxy.

I guess the full document reader capability is not what you're after, but only the selected text?

anonys commented 2 months ago

Hey @danielsaidi Yes correct, I am using full document reader when I want to access the whole text but in certain situations I need to get the selected text only - and sometimes it's beyond 2 lines.

danielsaidi commented 2 months ago

If the range information can be used, it should be possible, but I'm sure it requires the same kind of underlying operations as the full document reader. I'll keep this open.