@dhwaniapp/plugin-sdk
v1.5.0
Published
Software Development Kit (SDK) and manifest schemas for building Dhwani Note Taking plugins.
Maintainers
Readme
@dhwaniapp/plugin-sdk
Software Development Kit (SDK) typings and manifest schemas for building custom extensions in Dhwani Note Taking.
Installation
Install the SDK as a devDependency in your plugin project:
npm install --save-dev @dhwaniapp/plugin-sdk1. JSON Schema Validation (application.json)
To enable autocomplete and inline schema validation in your editor (e.g. VS Code), add the $schema reference pointing to the public CDN registry at the top of your application.json manifest:
{
"$schema": "https://unpkg.com/@dhwaniapp/plugin-sdk@latest/plugin-manifest.schema.json",
"display_name": "My Custom Node Plugin",
"system_name": "my.custom.node",
"version": "1.0.0",
"author": "Developer Name",
"license": "MIT",
"permissions_required": ["use_page_extention"]
}2. Editor typings and Intellisense (dist/*.js)
To enable code suggestions for window.Dhwani and window.DhwaniEditorSDK namespaces, add the type reference directive at the top of your JavaScript source files:
/// <reference types="@dhwaniapp/plugin-sdk" />
(function() {
const React = window.React;
const { Node, ReactNodeViewRenderer, NodeViewWrapper } = window.DhwaniEditorSDK;
// Your custom editor node view code...
})();If you are developing your plugin with TypeScript, configure your project's tsconfig.json to load the SDK typings automatically:
{
"compilerOptions": {
"types": ["@dhwaniapp/plugin-sdk"]
}
}