-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Introduce a way to check if changes were introduced by typing #3158
Comments
Sounds really interesting. 👍 |
I'm also in favor of such change. There are many cases in which we need such check and some standardized way for this would be awesome. I like the |
If this PR needs to add some API that we'd be removing after closing this ticket, I'd do that right now. |
I don't know the situation and I can't tell if this makes sense in a long run – whether we'll not need dozens of types and/or those types will become unreliable for some reason (by getting weaker meaning or something). Once we'll start introducing them there will be no way back.
So, unless you're really sure about the new types, I'd go for local changes, like the proposed here. |
Quick questions about API:
|
Ad 1. Typing = input + delete. So we can even have multiple methods for that in multiple places. Ad 3. What would be the purpose of exposing it? |
None probably. I'd leave that as private. |
Probably not worth exposing right now. I use input buffer batches in track changes (and AFAIR they are used somewhere else too) but that's the "current batch" and this is an important property. Old batches, stored in a |
Feature: Introduced `Input#isInput()`. Closes #214. Fixed the `TextTransformation` feature so it willl trigger only for typing changes. Closes #208.
I think it would be useful to have a way to check if given changes were done through typing. I see it as a method on
Typing
orInputCommand
instance.This could be solved in one of two ways:
InputCommand
batches in some kind of aWeakSet
.Then, we could use it like this:
When this is done, we should fix changes introduced by this PR: https://github.com/ckeditor/ckeditor5-typing/pull/213/files
The text was updated successfully, but these errors were encountered: