- The plugin code doesn't need to be written in ES6,
- Your class has to extend the BasePlugin class,
- Your plugin files need to be included to your site, see the following example:
<script src="./handsontable.full.js"></script>
<script src="./yourPluginFile.js"></script>
- Copy the externalPluginSkeleton.js file and rename it to describe your plugin. Let's use
myPlugin.js
for this example. - Change the class name to fit the filename, in our case:
function MyPlugin(hotInstance) {
and in the method definitions:
// for example
MyPlugin.prototype.isEnabled = function() {
}
- Implement your functionality using the guidelines from the comments,
- Include the
handsontable.full.js
andmyPlugin.js
files on your website, and you're good to go!
<script src="./handsontable.full.js"></script>
<script src="./myPlugin.js"></script>