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

Replacing selected text #35

Open
nkrusch opened this issue Dec 27, 2020 · 2 comments
Open

Replacing selected text #35

nkrusch opened this issue Dec 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@nkrusch
Copy link
Contributor

nkrusch commented Dec 27, 2020

Could the keyboard be made to replace selected text with a different style?

@nkrusch nkrusch added the enhancement New feature or request label Dec 27, 2020
@nkrusch
Copy link
Contributor Author

nkrusch commented Jul 24, 2021

TODO:
When changing selected style, if there is active selection, replace the selected charsequence with the a charsequence encoded in the newly selected style & maintain the selection. It should be fairly straightforward? Spoke too soon, need to "decode" before being able to encode in a different style. May need to use a string builder. I think this is related to the delete key behavior.

nkrusch added a commit that referenced this issue Jul 24, 2021
@NA0341
Copy link
Contributor

NA0341 commented Jan 7, 2023

The easiest part of the decoding is probably regular characters.

  1. Detect if there are special characters. | If none, decode.
  2. Match selection with known styles. | If match, decode.
  3. Try to interpret the selected text. (There are unified tools to do this. Maybe ready made libs exist too?)

I think this is related to the delete key behavior.

Every other keyboard I used deleted special characters as intended (OpenBoard, Hacker's Keyboard, Unexpected Keyboard, …).

This seems to be a rather weird bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants