Once the NWE API is stable, https://www.mediawiki.org/wiki/VisualEditor/Gadgets (and/or other documentation) should be updated to help gadget developers to work with it.
- A user developped a gadget to add a button to the VE toolbar that inserts some template.
- What is requiered to make this code work with NWE?
- How can he decide which parts go before and which ones after the input cursor?
- A user developped a gadget for the classic wikitext editor.
- How can he tell apart the visual mode of VE and NWE to only run in NWE mode?
- How can he get/set the complete wikitext? The position of the cursor? The current selection? (I.e. the stuff that the jquery.textSelection module handles for a plain textarea.)