Open mattwilmott opened 2 years ago
You can list your plugin in hediet.vscode-drawio.plugins
.
The content of that referenced js file gets injected into the drawio webview.
Here is an example of such a plugin: https://github.com/hediet/vscode-drawio/blob/ea7f2a6f32c2892f86e8f8347772b803ba6b0f10/examples/tooltips-plugin.js
Apologies @hediet,
I meant can the README be updated to reflect how to set the plugin vars in VSCode's workspace settings.json
The following fields need a bit more of a description added:
And some context in the projects README.md regarding how to load a custom plugin and how to load a built in plugin would be helpful
+1 for this
I am trying to enable the svgdata plugin and it is not clear how to do this? Could you please provide some information about how to do this? When adding this to the settings.json
"hediet.vscode-drawio.plugins": [
{
"file": "C:/Users/12345/.vscode/extensions/hediet.vscode-drawio-1.6.6/drawio/src/main/webapp/plugins/svgdata.js"
}
]
I get this error:
Found unknown plugin "file:///c%3A/Users/12345/.vscode/extensions/hediet.vscode-drawio-1.6.6/drawio/src/main/webapp/plugins/svgdata.js" with fingerprint "dde72233a663f0c5509da9642f9840c2ad08406373edef7f8c44e7e891752143"
I get this error:
You have to click the button in the notification to allow this plugin!
what is the plugin's fingerprint? Is it a md5sum or something that needs to be generated?
That's an implementation detail. The extension computes it and shows the user a notification.
are the pluginIds referenced from somewhere or up to the user to assign?
I think knownPlugins should not be a visible setting, but rather a hidden one - the extension manages this.
is the file path relative and from where?
It is absolute, but you can use ${workspaceFolder}
how to load the builtin plugins, see list below?
This is not supported.
why is there a known_plugin list and a plugin list?
knownPlugins is managed by the extension (and should be private). Plugins is managed by the user.
It is unclear how both built-in and custom plugins are loaded using the defined snippets in settings.json
Can the README.md be update please to reflect how to achieve this?