<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>IPluginTypesEditor Plugin Type</title><link>https://community.telligent.com/community/11/w/api-documentation/64396/iplugintypeseditor-plugin-type</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>IPluginTypesEditor Plugin Type</title><link>https://community.telligent.com/community/11/w/api-documentation/64396/iplugintypeseditor-plugin-type</link><pubDate>Tue, 19 Nov 2019 19:35:50 GMT</pubDate><guid isPermaLink="false">ae4d69bd-1d66-4a4a-9db8-6e584f1536a1</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/api-documentation/64396/iplugintypeseditor-plugin-type#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 11/19/2019 19:35:50&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;div class="documentation"&gt;&lt;p&gt;Plugin that exposes an editing UI associated to specific types of plugins.&lt;/p&gt;&lt;p&gt;&lt;code&gt;IPluginTypesEditor&lt;/code&gt; is defined in the &lt;code&gt;Telligent.Evolution.Extensibility.Version1&lt;/code&gt; namespace of Telligent.Evolution.Platform.dll&lt;/p&gt;&lt;div class="documentation-stub"&gt;&lt;h2&gt;&lt;a id="Definition" name="Definition"&gt;&lt;/a&gt;Definition&lt;/h2&gt;&lt;pre&gt;interface IPluginTypesEditor : [[IPlugin Plugin Type|IPlugin]]
{
	IEnumerable&amp;lt;Type&amp;gt; PluginTypes { get;  }
	string GetViewHtml(IPlugin plugin, string apiJson);
}
&lt;/pre&gt;&lt;/div&gt;&lt;div class="documentation-members properties"&gt;&lt;h2&gt;&lt;a id="Properties" name="Properties"&gt;&lt;/a&gt;Properties&lt;/h2&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PluginTypes&lt;/td&gt;&lt;td&gt;&lt;code&gt;IEnumerable&amp;lt;Type&amp;gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="documentation-members methods"&gt;&lt;h2&gt;&lt;a id="Methods" name="Methods"&gt;&lt;/a&gt;Methods&lt;/h2&gt;&lt;h3&gt;	string GetViewHtml(IPlugin plugin, string apiJson);
&lt;/h3&gt;&lt;p&gt;Returns the HTML-based UI used to edit the plugin.&lt;/p&gt;&lt;h4&gt;&lt;a id="Parameters" name="Parameters"&gt;&lt;/a&gt;Parameters&lt;/h4&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;plugin&lt;/td&gt;&lt;td&gt;&lt;code&gt;IPlugin&lt;/code&gt;&lt;/td&gt;&lt;td&gt;The plugin being edited&lt;/td&gt;&lt;td&gt;Required&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;apiJson&lt;/td&gt;&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;&lt;td&gt;JSON representation of the client-side API to enable integrating the custom API with the platform.

{
    registerSave: function(saveFunction) { /* ... */ },
    registerContent: function(contentDetails) { /* ... */ },
	validate: function() { /* forces all validation on the plugin process, returns true (valid) or false (invalid) */ }
}

The registerSave() function should be called with a reference to a function of the custom UI that can be called to save the configuration form. The saveFunction parameter, when called by the platform, is provided a single object parameter with the following properties:

{
    success: function() { ... },
    error: function() { ... }
}

The implementation of the saveFunction should save the custom configuration UI and call the appropriate function (success() or error()) provided to it when complete.

The registerContent() function should be called to register conditionally rendered content (such as tabs). The contentDetails parameters is an object in the format:

{
    name: &amp;#39;Name of the tab&amp;#39;,
	orderNumber: 1, /* optional order for this UI compared to other UIs */
    selected: function() { /* called when the tab is selected */ },
    unselected: function() { /* called when the tab is unselected */ },
	validate: function() { /* called when tab should be validated, should return true (valid) or false (invalid) */ },
	actions: [
		{
			label: &amp;#39;Label of the action&amp;#39;,
			messageName: &amp;#39;name of the message to publish when this action is invoked&amp;#39;,
			messageData: &amp;#39;data to provide when the message is published&amp;#39;,
			show: /* either &amp;#39;always&amp;#39; or &amp;#39;contextually&amp;#39;, default: &amp;#39;contextually&amp;#39; */
		}
	]
}
&lt;/td&gt;&lt;td&gt;Required&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4&gt;&lt;a id="Return_Type" name="Return_Type"&gt;&lt;/a&gt;Return Type&lt;/h4&gt;&lt;p&gt;&lt;code&gt;string&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>