Adding Your Own Features
Last updated
Last updated
When you click Edit in the Plugin Playground sample plugin, you will see the HTML, JavaScript (JS), and CSS panels. The HTML panel (left) enables you to modify the user interface of your plugin. The JS panel (middle) enables you to write functions that can communicate to FormIt using the FormIt JS Plugin API. Finally, the CSS panel (right) will determine the style of your HTML.
Let's add a feature to this plugin to create a cylinder.
First, let's configure the input field and UI button in the HTML panel. Copy the following code and paste it after line 23 and before <!-- Do not remove below scripts unless you know what you're doing- - >
This will add some basic UI elements to our plugin.
Next, let's add two functions in our JS panel. Copy the following code and paste it at the end of the file (after line 16).
This will create a cylinder in our FormIt workspace.
For complete documentation on the FormIt plugins API, see the useful links section.
When you’re ready to see the results, click the Play button again and you will see your updates to the plugin in the same panel.