Talk:VisualEditor/Gadgets/Creating a custom command

About this board

Add Customized button to VisualEditor

2
AIDInn - pmbd (talkcontribs)

Hello,

I would like to add a button in the VisualEditor that initiates drawio syntax. I have made it with the WikiEditor. But I could not make it with the VisualEditor. I am still new with js, so I hope I can have some guidance.

Your help is much appreciated. Thank you.

Whatamidoing (WMF) (talkcontribs)

Unfortunately, I know even less about Javascript than you do. It's possible that you would get more help at the Project:Support desk.

Reply to "Add Customized button to VisualEditor"
P.a.a (talkcontribs)

Is this sample outdated?

Apparently the code that is passed to mw.libs.ve.addPlugin never gets a chance to run

Schnark (talkcontribs)
P.a.a (talkcontribs)

Thanks for the quick reply.

It seems like a race condition, because although it doesn't work for me from the console, it does work (slightly modified) from common.js

Reply to "Code doesn't work"
There are no older topics