Develop with Writer
How to use Writer functionality in your plugin
Last updated
How to use Writer functionality in your plugin
Last updated
Writer plugin gives you methods to use in your plugin to open articles in Writer application if it's mounted in the same workspace with your plugin, or open an article with the Naviga writer in a new tab.
Writer register it's own methods with Dashboard Actions
You can use any of these actions in your plugin.
If your plugin is running beside Writer plugin in the same workspace openArticle action will open the requested article within Writer plugin by calling openArticle action with passing the article {uuid, url}
If your plugin is running beside Writer plugin in the same workspace get:article action will return the opened article {uuid, url} by resolving a promise.
In your plugin you can import useAction from Dashboard, so you can "import" Writer actions to your plugin.
Here we used com.naviga.writer:openArticle
action to open the article with given uuid === 838d42cf-507a-c701-f46d-6cd0a738cca4
If you called openArticle action while Writer plugin is not mounted, The requested article will open in a new tab with the Naviga Writer.
If you called get:article action while Writer plugin is not mounted, get:article action will reject the promise
ID
Descriptions
com.naviga.writer:openArticle
An action to handle open an article in Writer application with article uuid
com.naviga.writer:get:article
An action type promise, it will resolve with opened article {url, uuid}, and rejects if Writer application is not mounted