-
Notifications
You must be signed in to change notification settings - Fork 7
T/208: TextTransformation should only consider typing changes #213
Conversation
Generally, I dislike heuristics like the one that checks if typing happened. For now, I am okay merging this, but I will make a follow-up in typing to solve the problem of recognizing if typing happened. This is not the first case where this pops up and where it would be useful to have this kind of check. |
@scofalik I had other heuristics that check if the change wasn't |
I understand but still, it's better to be sure. If we can check something for sure with low cost, I'd rather have that than a heuristic, so I've made a follow-up. |
So I'll fix this with #214 as this is much needed IMO :) |
@scofalik please re-review this with |
* | ||
* **Note:** This method checks if the batch was created using {@link module:typing/inputcommand~InputCommand 'input'} | ||
* command as typing changes coming from user input are inserted to the document using that command. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to provide an example here. Check the issue discussion -- I've posted an example snippet there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't cost us much and if anyone would wonder how to exactly use it then they will have a snippet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a really simple one - probably is enough.
*/ | ||
_evaluateTextBeforeSelection( suffix ) { | ||
_evaluateTextBeforeSelection( suffix, data = {} ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do pass the batch
for the matched:data
event.
Suggested merge commit message (convention)
Feature: Introduce
Input.isInput()
method. Closes ckeditor/ckeditor5#3158. Also introduces a fix for the TextTransformation feature - it willl only consider typing changes. Closes ckeditor/ckeditor5#3153.Additional information
Input.isInput()
check. Introduce a way to check if changes were introduced by typing ckeditor5#3158.