Is it somehow possible to allow text formatting / adding links/tables to some kind of TextInputWidget in the MediaWiki VisualEditor? For example in the WhitespacePreservingTextInputWidget?
Or maybe there's some other class I could use for that?
Is it somehow possible to allow text formatting / adding links/tables to some kind of TextInputWidget in the MediaWiki VisualEditor? For example in the WhitespacePreservingTextInputWidget?
Or maybe there's some other class I could use for that?
@ESanders (WMF) thanks for the answer! I guess the version of VE I have is outdated as it doesn't contain the TargetWidget class, but I got it from the documentation site.
Is there any chance you could link me an example of the usage of this Widget (e.g. the image dialog you mentioned)? I sadly couldn't find one and trying to use it as the other Widgets I use doesn't work.
After some more trying-to-get-it-done I think I can narrow my problem down: I need to pass a new Document to the TargetWidget which has no content yet but can be modified. Maybe someone could tell me how to create such a Document (i.e. which parameters to pass to which of the Document - constructors)?
I'd have a look at the Media or Reference dialog code as reference implementations of this.