Thank you for the wonderful project.
I want “closeBrackets” to correspond to double-byte characters (eg “「” and “」”).
If you specify the following, it will not work as desired.
const defaults = {
brackets: ["「","(", "[", "{", "'", '"'],
before: "」)]}'\":;>"
};
No.1: Press “「” on the keyboard. The closing parenthesis (」) is completed, but the entered “「” is not finalized.
No.2: Press Enter on your keyboard to confirm (「). (compositionend)
Extra characters(「) and line breaks are inserted.
By the way, the delete process works as desired.
I’m looking for a way to detect the compositionend(No.2 screenshot), but couldn’t find it.
CM.EditorView.updateListener.of(...)
can catch the input(undecided and underlined), but not the compositionend.
I asked, because I wanted to take an approach that fits the CodeMirror 6 specifications, rather than an excessive hack.
I would be grateful if you could give me some advice when you have time.
(It’s translation software, so I’m sorry if it’s hard to convey.)