Thread:VisualEditor/Feedback/extend Visual Editor – migrating custom toolbar function made for WikiEditor

For the WikiEditor I wrote some functionalities custom buttons that call a jQueryUI dialog like decribed in https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization. I'd love to provide the same functionality in the Visual Editor. However, I was not able to find out:


 * If there is a way to migrate the code without rewriting it from scratch
 * How extentions for the visual Editor should be written.

I have head had a look at the API already (https://doc.wikimedia.org/VisualEditor/master/) however, I was unable to determine how Extentions/3rd party code may be hooked in.