Topic on Extension talk:CodeMirror

Jump to navigation Jump to search

How to check if switched on and access its API

1
V111P (talkcontribs)

For some reason the page Extension:CodeMirror does not explain these simple questions. If the API is not accessible in MediaWiki this should obviously be documented on the extension's page.

P.S. thanks to a comment by User:Trustable in another thread I figured out that you can check if CodeMirror is switched on with: $('.mw-editbutton-codemirror-active').length > 0 and you can swith it on/off with: $('#mw-editbutton-codemirror').click()

Reply to "How to check if switched on and access its API"