Configure icon is displayed next to
its name. To configure the plugin, click the icon and follow the instructions.
Configure icon displayed, follow
these steps:<extension type="WebappServlet" role="config" class="com.oxygenxml.sdksamples.github.GithubPluginConfigExtension"/>
The class attribute value should point to an extension of the PluginConfigExtension class.
For example:
{webapp-context}/plugins-dispatcher/RESULT_OF_GETPATH
window.addEventListener('message', function (event) { var action = event.data.action; var origin = event.origin; switch (action) { case 'apply': // call the doPut method of your PluginConfigExtension here using an XMLHttpRequest // and send the required options taken from the inputs you sent with the getOptionsForm method. var xhr = new XMLHttpRequest(); xhr.open("PUT", "../plugins-dispatcher/RESULT_OF_GETPATH"); // after receiving the response send it back to the sender of the message with a done property // set to true if the action completed successfully or false otherwise. And send a message for // the user as well. Also, make sure to set the origin to the event.origin otherwise the message // will be ignored event.source.postMessage({done: true, message: 'Options set succesfully for plugin X.'}, origin); break; case 'restoreDefaults': // call the doDelete method of you PluginConfigExtension here using an XMLHttpRequest // after receiving the response send it back to the sender of the message with a done property set // to true if the action completed successfully or false otherwise. And send a message for the user // as well. Also, make sure to set the origin to the event.origin otherwise the message will be ignored event.source.postMessage({done: true, message: 'Options reset successfully for plugin X.'}, origin); break; }
Delete the plugin button on the
right side of its name.