Paste Table

approved

by jyqqs

把 AI 对话(豆包/DeepSeek 等)复制的 Tab/空格纯文本一键转成标准 Markdown 表格,支持可选的数字排序列 - This plugin has not been manually reviewed by Obsidian staff.

55 downloadsUpdated 14d ago0BSD

Paste Table

Obsidian plugin · Turn plain-text tables copied from AI into real Markdown tables instantly.

GitHub release GitHub license GitHub stars Lint 中文

Why?

When you copy a table from an AI chat (ChatGPT, Claude, DeepSeek, etc.) or any other source, the clipboard actually contains plain text — rows aligned with Tab or spaces:

Capability     Command              Use case
Cache object   SET / GET / EXPIRE   user profile, config, session
Batch caching  MSET / MGET          fewer network round-trips

Pasting that into Obsidian produces scattered text and the table structure is completely lost. Paste Table converts it back into a real Markdown table with one action.

Features

  • Paste to convert: reads clipboard plain text, auto-detects table structure, and inserts a Markdown table directly. No dialogs, no interruption.
  • Convert selection: turn existing Tab/space-aligned pseudo-tables in your notes into proper tables with one click.
  • Multi-strategy parsing: auto-detects Tab, | (pipe), and consecutive-space separators, covering most AI copy scenarios.
  • Smart detection: regular paragraphs are inserted as-is, never falsely converted.
  • Row number column (optional): prepends # / 1 / 2 / 3 … to the leftmost column.
  • HTML fallback: converts clipboard HTML <table> (e.g. from browsers) when present.
  • Fully offline: all conversion is local. No telemetry, no network requests.

Demo

Before (copied from AI)

Capability	Command	Use case
Cache object	SET / GET / EXPIRE	user profile, config
Batch caching	MSET / MGET	fewer round-trips

After (inserted into Obsidian)

CapabilityCommandUse case
Cache objectSET / GET / EXPIREuser profile, config
Batch cachingMSET / MGETfewer round-trips

Installation

Option 1: Obsidian Community plugins (recommended)

Settings → Community plugins → Turn off Restricted mode → Browse → search "Paste Table" → Install & Enable

Option 2: Manual install

  1. Download main.js, manifest.json, styles.css from the releases
  2. Place them in your vault's plugin folder and restart Obsidian:
<Vault>/.obsidian/plugins/paste-table/

Usage

Tip: bind Ctrl+Shift+V to Clipboard plain text (Settings → Hotkeys) for an instant "copy → paste-as-table" workflow.

CommandDescription
Clipboard plain textReads the clipboard and converts to a Markdown table if a table structure is detected
Convert selectionConverts selected Tab/space-aligned text into a Markdown table
Clipboard HTMLConverts clipboard HTML <table> data (fallback)

Workflow

  1. Hit "copy" in your AI chat (the plain text table goes to the clipboard)
  2. Back in Obsidian, press Ctrl+Shift+V (or run the command from the palette)
  3. The table is inserted. Done.

Settings (Settings → Paste Table)

SettingDescriptionDefault
Row number columnShow # / 1 / 2 / 3 … on the leftmost columnOff
Min space gapMinimum consecutive spaces to treat as a column separator2

FAQ

Q: My content was inserted as-is instead of being converted. A: It failed the "looks like a table" check — likely a single line or not enough structure. Try lowering "Min space gap".

Q: Do you upload my notes or clipboard? A: No. Everything runs locally; the plugin makes no network requests.

Q: Does it work on mobile? A: It is a desktop-only plugin (isDesktopOnly: true). Mobile support may be evaluated later.

Q: Hotkey not working? A: Obsidian doesn't reserve Ctrl+Shift+V by default — just bind the command under Settings → Hotkeys.

Development

git clone https://github.com/SpiderK-104/paste-table.git
cd paste-table
npm install        # install dependencies
npm run dev        # watch mode
npm run build      # production build
npm run lint       # lint

License

MIT

Credits


中文文档

为什么会有这个插件?

AI 对话(豆包、DeepSeek、腾讯元宝…)或其他任意来源内容中复制表格时,剪贴板里拿到的其实是纯文本——用 Tab 或空格对齐的文本行,举个例子:

能力        用到的指令           场景
缓存对象    SET / GET / EXPIRE  用户信息、配置、session
批量缓存    MSET / MGET         减少网络往返

直接粘贴进 Obsidian 会变成一堆散乱文字,表格结构全部丢失。Paste Table 帮你一键转换回真正的 Markdown 表格

功能特性

  • 粘贴即转换:读取剪贴板纯文本 → 自动识别表格结构 → 直接插入 Markdown 表格,无弹窗、无干扰
  • 选中再转换:笔记里已有的 Tab / 空格伪表格,选中后一键转正
  • 多策略解析:自动识别 Tab| 管道 → 连续空格 三种分隔形式,覆盖绝大多数 AI 复制场景
  • 智能判断:普通段落不会被误转换,原样插入
  • 数字排序列(可选):表格最左侧自动插入 # / 1 / 2 / 3 … 序号列
  • HTML 保底:剪贴板确实存在 HTML <table>(如浏览器网页)时也能转换
  • 离线运行:纯本地逻辑,不上传任何数据,无任何网络请求

安装

设置 → 第三方插件 → 关闭安全模式 → 社区插件 → 浏览 → 搜索 "Paste Table" → 安装并启用

国内访问官方市场困难时,推荐使用 PKMer Market 加速安装与更新。

使用

建议把 Ctrl+Shift+V 绑定到 Clipboard plain text设置 → 快捷键),实现「复制 → 粘贴即表格」。

命令说明
Clipboard plain text读取剪贴板,检测到表格结构即转成 Markdown 表格插入
Convert selection直接将选中的 Tab / 空格对齐文本转换为表格
Clipboard HTML剪贴板有 HTML <table> 时按 HTML 转换(保底方案)

设置项(设置 → Paste Table)

设置说明默认值
数字排序列表格最左侧显示 # / 1 / 2 / 3… 序号列
最小连续空格数空格对齐表格的列分隔阈值,连续 n 个空格视为一列2

FAQ

Q:为什么我的内容被原样插入而没有转换? A:说明文本未通过「像表格」检测。可能是单行文本或不足以构成表格结构;也可以调低「最小连续空格数」再试。

Q:会把我笔记内容或剪贴板上传吗? A:不会。所有转换都在本地完成,插件不发起任何网络请求。

Q:支持手机端吗? A:插件声明为桌面端(isDesktopOnly: true)。核心逻辑是纯 TypeScript,后续版本可评估开放移动端。

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.