code-input icon indicating copy to clipboard operation
code-input copied to clipboard

Multiple plugins of same type not allowed in template.

Open WebCoder49 opened this issue 1 year ago • 0 comments

When multiple plugins of the same class are added to a template, undesired and undocumented behaviour will often occur occur. This shouldn't occur: plugins of the same class should be self-contained enough to exist alongside each other where it makes sense, or throw an error if there is already a plugin of the same class.

Reasons:

  • (many plugins) both instances use the same data source from pluginData even though their configurations may be different.
  • (SelectTokenCallbacks, probably others) both instances interact with the same HTML elements leading to one overwriting the other.

To fix:

  • Fix existing plugins.
  • Add comments to the test plugin, and more tests for multiple instances of plugins, to ensure this is not rebroken in the future.
  • Delete the remark in the README about this.

WebCoder49 avatar Oct 23 '24 13:10 WebCoder49