NoteDraw is a plugin for editing rendered note text and drawing directly on notes.
It is built as a surface layer: the same drawing and text-edit logic works on Obsidian reading view, source view, embedded note previews, and supported webview surfaces.
New drawing files are stored here:
<vault>/.obsidian/plugins/notedraw/drawings/
Each note gets a JSON file derived from its vault path. NoteDraw keeps drawing data separate from Markdown text, so Markdown sync and normal editing remain predictable.
Version 0.2.0 is the full NoteDraw rename and uses plugin id:
notedraw
If an older local prototype folder exists, NoteDraw can read its previous drawing JSON files and copy them into the new notedraw/drawings folder on first access. The old files are not deleted.
Copy these files into:
<vault>/.obsidian/plugins/notedraw/
Required files:
main.js
manifest.json
styles.css
Then enable:
Settings -> Community plugins -> Installed plugins -> NoteDraw
NoteDraw now keeps source code under src/ and builds the Obsidian runtime file at the repository root.
npm install
npm run build
Build output:
main.js
The release package still uses the standard Obsidian plugin layout:
main.js
manifest.json
styles.css
The source tree keeps extras/ for support-code images used at build time. Release builds embed those images into main.js, so the installed plugin does not require separate image files.
The settings page currently includes:
NoteDraw exposes a small API from the plugin instance:
const api = app.plugins.plugins.notedraw.api;
For convenience, it is also exposed while the plugin is loaded:
const api = window.NoteDraw;
Current API:
api.version;
api.getActiveController();
await api.readDrawings(file);
await api.writeDrawings(file, drawingData);
api.getStoragePaths(file);
await api.replaceSelectionText(file, originalText, editedText);
await api.insertStroke(file, stroke);
Example: read current note drawings.
const file = app.workspace.getActiveFile();
const drawings = await app.plugins.plugins.notedraw.api.readDrawings(file);
console.log(drawings.strokes.length);
Example: insert a stroke.
const file = app.workspace.getActiveFile();
await app.plugins.plugins.notedraw.api.insertStroke(file, {
brush: "pen",
color: "#e53935",
width: 3,
opacity: 1,
points: [
{ x: 0.2, y: 0.2 },
{ x: 0.5, y: 0.35 },
{ x: 0.7, y: 0.6 }
]
});
Example: AI-assisted text replacement.
const file = app.workspace.getActiveFile();
await app.plugins.plugins.notedraw.api.replaceSelectionText(
file,
"old rendered text",
"edited Markdown text"
);
The API is intentionally plain JSON and string based so local AI agents can:
For safety, AI tools should read first, prepare a small patch, then write only the target note or drawing file.
NoteDraw is structured around controllers bound to visible note surfaces. That makes future support practical for:
The current package focuses on the local Obsidian plugin runtime. The API and DOM controller split are the extension points for broader web support.
Current version: 0.2.38.