Preparing
Before you start developing a plugin, you should go through the following preparation steps.
Step 1. Prerequisites
Set up the following:
-
ONLYOFFICE DocSpace. Choose one of the following:
- On-premises: get ONLYOFFICE DocSpace and follow the installation instructions in ONLYOFFICE Help Center.
- SaaS: register a DocSpace SaaS account.
-
@onlyoffice/docspace-plugin-sdk npm package
To install the @onlyoffice/docspace-plugin-sdk npm package globally, use the following command:
npm i -g @onlyoffice/docspace-plugin-sdk
Step 2. Draft
Design the way your plugin will work:
-
Choose the service that allows you to add the necessary functionality to your DocSpace.
For example, AssemblyAI, ConvertAPI, Draw.io.
备注Make sure the service documentation is available, and check its license, API methods availability, etc. For some services, the user must obtain an API key to start using the plugin.
-
Think about where to implement the plugin, what the plugin's structure will be, how the user will interact with the plugin's components, etc. Make a list of the required plugin types and items depending on this information. For more information, read the Plugin types and Plugin items sections of the Plugins SDK documentation.
-
Come up with the plugin's structure. All the required files are described here.
-
Choose a name for your plugin and write a description for it.