feat: ignore input method procedure in history plugin #8

Closed
Matrixbirds wants to merge 2 commits from master into master
Matrixbirds commented 2022-09-21 09:33:09 +02:00 (Migrated from github.com)

Relate issue 1311

Relate issue [1311](https://github.com/ProseMirror/prosemirror/issues/1311)
Matrixbirds commented 2022-09-26 11:00:52 +02:00 (Migrated from github.com)

It's not perfect cover with input method scenario, still have edge case when change select the Chinese word with the help of input method.

It's not perfect cover with input method scenario, still have edge case when change select the Chinese word with the help of input method.
Matrixbirds commented 2022-10-09 18:42:11 +02:00 (Migrated from github.com)

To breif something what i did.
Basically, I create a new function named 'checkNewGroup', it will overwrite the original newGroup logical and it will produce the newGroup state for history state .
In Breif, Every applied transaction of prosemirror-history plugin will lookup composing when the applyTransaction function invoked. In order to merge pinyin character's until compositionend event fired when using input method like chinese sogou pinyin (chinese_name: 搜狗输入法).
There is a little break change for integrate this ime newGroup patch.

//  object of `this`, should has valid editor property. because `history` function depend upon editor.view.composing to approach when to produce ime newGroup check. 
history.call(this, this.options);

@marijnh

To breif something what i did. Basically, I create a new function named 'checkNewGroup', it will overwrite the original newGroup logical and it will produce the newGroup state for history state . In Breif, Every applied transaction of prosemirror-history plugin will lookup composing when the `applyTransaction` function invoked. In order to merge pinyin character's until compositionend event fired when using input method like chinese `sogou pinyin` (_chinese_name: 搜狗输入法_). There is a little break change for integrate this ime newGroup patch. ```javascript // object of `this`, should has valid editor property. because `history` function depend upon editor.view.composing to approach when to produce ime newGroup check. history.call(this, this.options); ``` @marijnh
marijnh commented 2023-04-14 16:20:40 +02:00 (Migrated from github.com)

This code is so strangely wrong (importing stuff that doesn't exist, adding this type annotations that make no sense) that I don't really have the patience to review it seriously, sorry.

This code is so strangely wrong (importing stuff that doesn't exist, adding `this` type annotations that make no sense) that I don't really have the patience to review it seriously, sorry.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-history!8
No description provided.