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

Extract text replacement functionality into common library #42

Open
rugk opened this issue May 15, 2021 · 2 comments
Open

Extract text replacement functionality into common library #42

rugk opened this issue May 15, 2021 · 2 comments
Labels
code quality Improving the code for the code's sake…

Comments

@rugk
Copy link
Owner

rugk commented May 15, 2021

As said in #4 (comment):

Hmm yeah, maybe it would make sense to make a common library at some point of time. slightly_smiling_face

Reason: It’s also used in rugk/awesome-emoji-picker#93 etc.

@tdulcet you’ve upvoted it, so I guess you agree.
How hard to you think it is?

If it’s easy we can make it before v1.0.

I’d of course would like to put it into https://github.com/TinyWebEx/ then and I could certainly help and setup the repo etc.

@rugk rugk added the code quality Improving the code for the code's sake… label May 15, 2021
@rugk rugk changed the title Extract functionality into common library Extract text replacement functionality into common library May 15, 2021
@tdulcet
Copy link
Collaborator

tdulcet commented May 16, 2021

@tdulcet you’ve upvoted it, so I guess you agree.
How hard to you think it is?

Hmm, well we cannot currently put it into a module because of bug 1451545. However, we could always load it as a separate script in the manifest.json file.

How hard it would be would depend on what exactly we want the library to do. If we just want to put the common getCaretPosition(), insertAtCaret(), insertAndSelect(), insertIntoPage(), countChars(), deleteCaret() and firstDifferenceIndex() functions into the library, that should be very easy. Generalizing the autocorrect() and undoAutocorrect() functions would be more difficult, although similar to what some of your other libraries already do. Note that this would also depend on #37.

@rugk
Copy link
Owner Author

rugk commented Aug 11, 2023

Made a repo for that: https://github.com/TinyWebEx/TextModification/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Improving the code for the code's sake…
Projects
None yet
Development

No branches or pull requests

2 participants