I love the new discussion tool and would love to hook into it. I'm using an autocorrect for the main VisualEditor. So adding dashes, arrows, Polish quotes etc. All this is still useful when replying.
So technically I need some activation hook similar to this:
mw.hook('ve.activationComplete').add(function () { ... });
And also need to have access to VE commandRegistry, VE Surface and VE sequenceRegistry.
//create and register the command ve.ui.commandRegistry.register(...); //let the surface know that there is a new command that can be executed ve.init.target.getSurface().commands.push(name); //create and register the sequence ve.ui.sequenceRegistry.register(...);
Full code of the gadget can be found here:
https://github.com/Eccenux/veAutocorrect/blob/master/veAutocorrect.js
Requirements
Done
- Volunteers are invited to share feedback about the API the Editing Team is considering implementing
- Volunteers are offered a way to try out the API approach the Editing Team is considering implementing (e.g via patchdemo)