In version 7.2 of ONLYOFFICE Docs we added the brand-new plugin manager which allows you to explore all available plugins and install or remove any plugin with just one click right in the editors. If you would like to create and add your own plugin to our marketplace, follow the steps below.
Fork the repository
Please note: you will need a GitHub account and basic knowledge of working on GitHub.
- Fork the plugin marketplace repository: https://github.com/ONLYOFFICE/onlyoffice.github.io. You will get a repo with the following address – https://github.com/YOUR-USERNAME/ONLYOFFICE/onlyoffice.github.io.
- Build your own GitHub Pages site from this repository to test your plugin in the web version later.
- Clone the fork to your local computer.
- Add a folder for your plugin to onlyoffice.github.io/sdkjs-plugins/content/.
Build your plugin
Create your plugin as described in our API documentation.
Test your plugin in the desktop app
Speaking briefly, you need to pack all the plugin files within the plugin folder into a zip archive, change its extension to .plugin, and add your plugin through the plugin manager.
Once tested, you can build your plugin further or fix the identified issues. You can run the desktop app in the debug mode with the
--ascdesktop-support-debug-info flag. To do this, follow the instructions here depending on the operating system you use.
Test your plugin in the web
To create an extension, open the onlyoffice.github.io/store/plugin-dev/extension/inject.js file and assign the path to your plugin on GitHub Pages site to the URL_TO_PLUGIN variable:
var URL_TO_PLUGIN = "https://YOUR-USERNAME.github.io/onlyoffice.github.io/sdkjs-plugins/content/helloworld/"
The onlyoffice.github.io/store/plugin-dev/extension folder is a new extension. Upload it to the browser, run your ONLYOFFICE Docs (Document Server) and find the plugin in the Plugin Manager.
Please note: when you are working on your plugin, it’s important to open the Plugin Manager to check and if necessary to improve how your plugin looks like there. You also need to take into consideration how the plugin looks like when switching to the Dark theme.
Submit your plugin
When you are ready with the plugin, make pull request from your fork to the github.com/ONLYOFFICE/onlyoffice.github.io repository.
In case everything is OK and it works properly, we will approve the PR and the plugin will appear in the marketplace.