XMind Bridge

by howie
5
4
3
2
1
Score: 50/100

Description

Create, import, preview, and open local XMind maps from Obsidian.

Reviews

No reviews yet.

Stats

0
stars
15
downloads
0
forks
3
days
3
days
4
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
2
commits

Latest Version

5 days ago

Changelog

Initial release of XMind Bridge for desktop Obsidian.

  • Create XMind maps in your vault or import existing .xmind files as vault copies.
  • Preview the embedded image offline in Reading view, Live Preview, and a dedicated file tab.
  • Open a vault copy in XMind and refresh its preview automatically after saving.

Opening and editing maps requires XMind. The macOS workflow was verified in Obsidian and XMind. Windows detection and launch have automated coverage and are awaiting a Windows desktop smoke test.

README file from

Github

XMind Bridge 1.0

Create, import, and preview local XMind maps in Obsidian. Open maps from your vault in XMind and see their previews refresh when you save. Previews use the embedded PNG and work offline.

XMind Bridge supports Obsidian desktop 1.7.2 or later on Windows and macOS. Install XMind if you want to open or edit maps in it. The plugin looks for XMind when you open a map and shows a notice if it cannot find it.

Installation

After XMind Bridge is listed in the community directory, go to Settings → Community plugins → Browse, search for XMind Bridge, then install and enable it.

To install manually:

  1. Download main.js, manifest.json, and styles.css from the latest GitHub release.
  2. Place all three files in .obsidian/plugins/xmind-bridge/ inside your vault. Create the xmind-bridge folder if needed.
  3. Reload Obsidian and enable XMind Bridge under Settings → Community plugins.

Usage

Open the command palette with Ctrl+P on Windows or ⌘P on macOS. Search for XMind Bridge to find the commands. The command names currently appear in Chinese.

  • Create a map. Run XMind Bridge: 新建 XMind 文件, enter a file name, and press Enter. You can also right-click a folder in the file explorer and choose 新建 XMind 文件 to create the map there.
  • Import a map. Open a Markdown note in editing mode, run XMind Bridge: 插入 XMind 文件, and select a .xmind file. The plugin copies it into your vault's configured attachment location and inserts an embed in the note.
  • Preview a map. Click a .xmind file in the file explorer to open a preview tab, or embed a vault file with ![[Folder/Map.xmind]]. Embedded previews appear in Reading view and Live Preview.
  • Edit a map. Click its preview image or the 在 XMind 中打开 button to open the vault copy in XMind. Save it in XMind to refresh the preview in Obsidian.

中文说明

在 Obsidian 中新建和预览本地 XMind 文件,在 XMind 中编辑,保存后自动更新。

支持 Windows 和 macOS 桌面版 Obsidian 1.7.2 及以上。预览使用文件内置的静态 PNG,可离线使用。点击打开导图时,插件会自动查找并启动本机的 XMind。找不到时,Obsidian 会提示安装。

安装

社区目录上线后,可在 Obsidian 的「设置 → 第三方插件 → 浏览」搜索 XMind Bridge,安装并启用。

手动安装时,从 GitHub Releases 分别下载 main.js、manifest.json 和 styles.css,放到知识库的 .obsidian/plugins/xmind-bridge/ 目录。若使用本地构建的 ZIP,则解压并将其中的 xmind-bridge 文件夹放到 .obsidian/plugins/。重新加载 Obsidian 后,在「设置 → 第三方插件」启用 XMind Bridge。

安装只涉及知识库的插件目录,不修改 Obsidian 或 XMind 的应用程序文件。

新建 XMind 文件

  • 按 Ctrl+P(Windows)或 ⌘P(macOS),执行 XMind Bridge: 新建 XMind 文件。文件保存到当前文件所在的文件夹,没有打开文件时保存到知识库根目录。
  • 也可以在左侧文件列表中右键点击文件夹,选择 新建 XMind 文件,直接保存到该文件夹。
  • 输入文件名后按回车,或点击「创建并打开」。插件会补上 .xmind 后缀,使用文件名作为导图的中心主题。若有同名文件,请换一个名称。
  • 文件创建后会尝试在 XMind 中打开。收到安装提示时,已创建的导图会保存在知识库中。编辑并保存后,回到 Obsidian 点击文件即可预览。

插入、预览与编辑

打开一篇 Markdown 笔记并进入编辑视图,按 Ctrl+P(Windows)或 ⌘P(macOS),执行 XMind Bridge: 插入 XMind 文件,选择电脑上的 .xmind 文件。

  • 文件按 Obsidian「文件与链接 → 新附件的默认位置」设置复制到当前知识库。
  • 同名文件自动编号,已有文件和外部原件均保留。
  • 笔记自动插入 ![[附件/导图.xmind]]。阅读模式和实时预览模式显示预览;源码模式显示原始引用。
  • 也可以自行将 .xmind 放入知识库,然后手写嵌入引用。点击左侧文件列表中的文件,在独立标签页预览。
  • 单击预览图或「在 XMind 中打开」,编辑的是当前知识库里的文件。在 XMind 中按 Ctrl+S(Windows)或 ⌘S(macOS)保存后,Obsidian 自动刷新,多个嵌入会同时更新。
  • 可以使用 ![[附件/导图.xmind|600]] 限制笔记内预览宽度。实时预览中将光标移入引用位置,可编辑引用文字;移开后恢复图片。

导入后请通过预览打开并编辑知识库内的副本。编辑外部原件不会更新知识库中的预览。

预览边界与故障排查

  • 一份文件显示其自带的一张预览图,1.0 不提供多画布切换或在 Obsidian 内编辑节点。图片的范围、清晰度及样式由 XMind 生成。
  • 「实时更新」指文件保存后的更新。XMind 中尚未保存的输入无法通过本地文件读取。
  • 本地普通文件以保存后约 2 秒内更新为目标。Obsidian 处于休眠或系统暂停时,返回前台后会补检;也可点击「刷新」。
  • 如果提示缺少内置预览图或只有占位图,请在 XMind 中打开并保存后重试。第三方程序生成的文件可能没有真正的预览图片。
  • 文件正在保存或短暂不可读时,会自动重试;失败时保留上一次图片并显示提示。
  • 文件丢失时检查路径。移动或重命名文件建议在 Obsidian 中操作,并启用其自动更新内部链接设置。
  • 支持不超过 100 MB 的 .xmind;内置 PNG 最大 16 MB、单边不超过 16384 像素且总像素不超过 64 Mi。超限文件仍可在 XMind 中编辑。
  • 加密文件、损坏文件及不包含可用 PNG 预览的文件不能预览。
  • Obsidian 的标准 Wiki 链接语法将 #、|、[[、]] 视为特殊字符,文件和文件夹命名请避免这些链接分隔符。

数据访问与卸载

预览只读取知识库中已引用的 .xmind 文件。导入时读取你在文件选择器中选中的外部文件,将副本保存到知识库并插入笔记引用。新建时写入一张含中心主题的导图。

点击打开导图时,Windows 上会查询 XMind 的注册表安装项和常见安装目录,macOS 上会检查常见的应用程序目录并在需要时通过系统查找 XMind。这些检查用于定位本机 XMind,启动时传入知识库中导图的路径。

缓存及图片地址仅保存在内存中。插件不联网、不上传文件、不改写已有 .xmind 文件、不扫描整个知识库,也不修改应用程序文件。

在「第三方插件」中停用并卸载 XMind Bridge 即可。知识库中的 .xmind 文件和笔记引用会保留;恢复插件后可以继续预览。

开发与验证

npm ci
npm test
npm run build
npm run package

npm run dev 持续构建。发布包位于 dist/xmind-bridge-1.0.0.zip。

在 macOS 上运行 npm run test:vault 可在项目内生成独立的 .test-vault 测试知识库并部署插件,不会安装到已有知识库。此脚本只读使用 /Applications/Xmind.app 中的示例作为本机验收素材,示例不会进入发布包。重复运行会更新测试插件并保留测试文件和编辑状态。

实机测试步骤与结果见 TESTING.md。测试库及导入素材由 .gitignore 排除。

许可

MIT;内含的 fflate 及其许可说明见 THIRD_PARTY_NOTICES.md。