Extension:SemanticFormsToolbar

The SemanticFormsToolbar extension provides a basic infrastructure for converting a semantic form into a toolbar icon. It was generated so that forms can be used to generate elements that are placed inline in wikitext, instead of editing an entire page.

Usage
In JavaScript, you can create a dialog definition suitable for WikiEditor's addDialog API using code similar to the following:

Remember that you also need to associate a toolbar icon with the appropriate dialog like so:

The public interface for SemanticFormsToolbar consists of one method: sfToolbar.getDialog. It takes two parameters: the first is the name of the form to be used, and the second is a unique identifier for this dialog (for HTML ids).

When the dialog is triggered, it will prefill the form with any templates that are selected in the editor, so you can edit a template with the forms as well as inserting one. The "save" button on the form is overridden by a JavaScript action, which replaces the current text with the output of the form.

Installation
This extension requires Semantic MediaWiki and Semantic Forms to be installed first.