Mouiz LANIKPEKOUN2 downloadsSwitch Markdown file cards in a canvas between an editable preview and a compact link. Requires the Advanced Canvas plugin.
Switches the Markdown file cards of a canvas between their editable preview and a compact link, one card at a time or for the whole canvas. A dense canvas becomes a navigation map; a card you want to edit goes back to its preview in one click.
The card is never converted: it stays a native file card, so its edges, its note identity and its backlinks are untouched. Only its presentation changes.
Requires the Advanced Canvas plugin (advanced-canvas), version 7 or later. Canvas Card View adds its controls through Advanced Canvas and has nothing to attach to without it.
[[Note name]]) and back.Only Markdown file cards are affected. PDF, image, group, text and web cards are left alone.
The state is stored per card in the canvas file, in the card's styleAttributes:
{ "type": "file", "file": "Notes/Plan.md", "styleAttributes": { "cardView": "link" } }
A card in its preview has no cardView entry, and a canvas that never used the plugin is unchanged. Other style attributes on the card are kept.
canvas.nodes, node.getData(), the floating menu and the canvas controls). An update of either can break it.Not in the community directory yet. To install by hand, build it (below), copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/canvas-card-view/, and enable it next to Advanced Canvas.
npm install
npm test # model and controller, under jsdom, against a fake canvas
npm run lint # the official Obsidian ESLint rules
npm run build # type-check, then bundle main.js
npm run deploy -- <vault>/.obsidian/plugins/canvas-card-view
src/model.ts holds the data rules and the saved format. src/controller.ts holds the toggles, the overlays and the safety rules, and has no Obsidian import: everything the app provides comes through a small interface, which is what lets the tests run it. src/main.ts is the Obsidian side.
MIT