Hi, I have been trying to create a gadget that enclose the currently selected text with a "math" tag. Can anyone guide me to a tutorial (or doc) explains that?
Topic on Talk:VisualEditor/Gadgets/Add a tool
How can I enclose a selected text with a specific tag?
I figured out how. That what I was looking for:
ve.init.target.surface.getModel().getFragment().insertHtml() (if you are interested in).
Congratulations on finding your solution. It might also be possible to implement this particular feature via the VisualEditor/Special characters tool.