Jump to content

Topic on Extension talk:CodeMirror/5

Option selectionPointer (from selection-pointer CM addon)

3
MarMi wiki (talkcontribs)

You can't change mouse cursor through option selectionPointer (from CM selection-pointer addon).

It works if you load mediawiki mode manually (topic Collapsed range (markText) hides cursor just before the range).

mw.loader.load("//codemirror.net/addon/selection/selection-pointer.js")
editor.setOption("selectionPointer","grab")

pl.wikipedia.org

MarMi wiki (talkcontribs)

Oh, that because cm.display.selectionDiv doesn't have any children.

Also it doesn't use class CodeMirror-selected to mark the selection.

MarMi wiki (talkcontribs)

Correction/update: cm.display.selectionDiv eventually will have children, if you make more than one selection (with Ctrl). It stores all the selection boxes EXCEPT the current/last/active one (so if you only use one, it will be most likely always empty).

Reply to "Option selectionPointer (from selection-pointer CM addon)"