Home > @jsplumbtoolkit/browser-ui > Surface > addPlugin
Surface.addPlugin() method
Add a plugin to the Surface. You can provide a type parameter to this method to avoid having to cast the return value, if you need to retain a reference to the plugin.
Signature:
addPlugin<T extends SurfacePlugin>(pluginSpec: SurfacePluginSpec): T;
Parameters
| Parameter | Type | Description |
|---|---|---|
| pluginSpec | SurfacePluginSpec |
Returns:
T