Page MenuHomePhabricator

Codemirror: fire hook when Codemirror editor enabled/disabled
Closed, ResolvedPublic

Description

Some gadgets that interact with the textbox/CodeMirror editor would be easier to handle if there was a mw.hook fired when the editor changes. For example, rebinding event handlers to the active editor element.

I think should be as simple as a mw.hook.fire in ext.CodeMirror.js

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 699983 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/CodeMirror@master] Fire a hook when the CodeMirror editor is switched

https://gerrit.wikimedia.org/r/699983

Change 699983 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] Fire a hook when the CodeMirror editor is switched

https://gerrit.wikimedia.org/r/699983

MusikAnimal closed this task as Resolved.EditedJul 13 2021, 4:45 PM
MusikAnimal claimed this task.
MusikAnimal added a subscriber: MusikAnimal.

Confirmed working on the beta cluster. I'll go ahead and resolve. Thanks again for adding this hook!