avim icon indicating copy to clipboard operation
avim copied to clipboard

Diacritics disappear in CodeMirror on GitHub

Open 1ec5 opened this issue 7 years ago • 4 comments

In CodeMirror text areas, any diacritics added by AVIM disappear as soon as the user adds another diacritic.

Among the places CodeMirror is used are GitHub and soon Wikimedia’s MediaWiki installations. Supporting Vietnamese text input while editing Wikipedia is a critical priority for AVIM.

(Per #135, AVIM used to work in CodeMirror by default, but something changed with that library in the last year or so, breaking AVIM.)

1ec5 avatar Jul 04 '17 17:07 1ec5

Actually, most of the demos at the CodeMirror site work fine. I’ve observed this issue at GitHub; it might be due to one of the addons GitHub installs. This is still important to investigate, because it’s likely that MediaWiki will be using many of the same addons.

1ec5 avatar Jul 04 '17 17:07 1ec5

GitHub installs the following addons:

[
  'codemirror/addon/comment/comment',
  'codemirror/mode/meta',
  'codemirror/addon/mode/simple',
  'codemirror/addon/mode/overlay',
  'codemirror/addon/mode/multiplex',
  'codemirror/addon/dialog/dialog',
  'codemirror/addon/search/search',
  'codemirror/addon/search/searchcursor',
  'codemirror/addon/search/jump-to-line',
  'codemirror-contrib/lib/mode/meta'
]

1ec5 avatar Jul 04 '17 17:07 1ec5

Confirmed that diacritics are preserved on the version of CodeMirror being deployed at Test Wikipedia. However, the dead key for removing diacritics (e.g., - in VIQR) doesn’t work after placing the insertion point at the end of a line.

1ec5 avatar Jul 07 '17 15:07 1ec5

Confirmed that diacritics are preserved on the version of CodeMirror being deployed at Test Wikipedia.

AVIM works with the Code_Editor_ extension and with VisualEditor – including when displaying syntax-highlighted code in VisualEditor. However, AVIM doesn’t work with CodeMirror when embedded inside the older wikitext editor. AVIM suffers from the same issue that plagues jQuery.ime.

1ec5 avatar May 08 '18 06:05 1ec5