Skip to content

[FR] Markdown-Based File Format for Canvas #163

@Developer-Mike

Description

@Developer-Mike

Background

The current JSON-based Canvas file format has several issues:

  • Poor Extensibility: No standardized way to extend the basic fields
  • Lack of Versioning: No version field, making improvements to the whole format nearly impossible without breaking compatibility.
  • No Metadata Object: No structured way to store additional information. It only supports nodes and edges as keys for the top level keys.
  • Poorly Named JSON Keys: The current keys (In my opinion) are poorly named and structured.

While the metadataCache issue for Canvas files was recently resolved by this plugin, I believe a Markdown-based format could provide additional benefits.

Proposal: Markdown-Based Canvas Files

Instead of JSON, Canvas files could be represented in a Markdown-based format that integrates naturally with Obsidian’s core features. Benefits include:
✅ Human Readability – Markdown is easy to read and edit, aligning with the needs of many Obsidian users.
✅ Full Linking Support – Allows linking to subtitles, textblock IDs, and even specific nodes (which is currently not even possible).
✅ Frontmatter Support – Enables metadata, making it easier to work with.
✅ Improved Searchability – Markdown files can be searched using Obsidian’s default search.
✅ Enhanced Metadata Handling – Tags, properties, and other metadata can be stored in a structured way.

Proposed Format

A possible format could be (Backslash before backtick only there for GitHub to format it properly):

--- node ---
# Node Id
edges: [[#Other Node Id]] [[#And Another Node Id]]
\```node-attributes
x: 100
y: 100
styleAttributes: { "border": "invisible" }
\```

# Anything
This is the markdown content of the node.

--- node ---
# Other Node Id
...and so on

The addition of this format by Advanced Canvas would allows users to seamlessly switch between the Markdown view and the Canvas view, offering flexibility in how they interact with their files.

Questions for the Community

  • What do you think about this approach?
  • How can we improve this format further?
  • Is this even a good idea and what would be the priority of implementing something like this?

Would love to hear your thoughts! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    big changeThis is a big feature request and it would take a while to add.feature requestNew feature or requestpriority-3questionQuestion about the usage of the plugin

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions