Plugin that exposes an editing UI associated to specific types of plugins.
IPluginTypesEditor
is defined in the Telligent.Evolution.Extensibility.Version1
namespace of Telligent.Evolution.Platform.dll
Definition
interface IPluginTypesEditor : IPlugin { IEnumerable<Type> PluginTypes { get; } string GetViewHtml(IPlugin plugin, string apiJson); }
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
PluginTypes | IEnumerable<Type> |
Methods
string GetViewHtml(IPlugin plugin, string apiJson);
Returns the HTML-based UI used to edit the plugin.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
plugin | IPlugin | The plugin being edited | Required | ||
apiJson | string | 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: 'Name of the tab', 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: 'Label of the action', messageName: 'name of the message to publish when this action is invoked', messageData: 'data to provide when the message is published', show: /* either 'always' or 'contextually', default: 'contextually' */ } ] } | Required |
Return Type
string