Thread:VisualEditor/Feedback/Visual Editor Programming: No around html tags please/reply (3)

The simplest solution is to wrap text with template in similar way to VisualEditor gadgets and VisualEditor gadgets. Using template instead of html tag may be preferred choice as it is more natural in wiki. But if you really want to add div with no templates, than you should probably create annotation class (e.g to inherit ve.dm.Annotation) and than use You can ask for tips and extra help on ve.dm in general in #mediawiki-visualeditor on freenode IRC.