Skip to content

Repository files navigation

Logseq-MD

English | 简体中文

Logseq-MD is a local-first Logseq plugin that repairs Markdown pasted from ChatGPT, Claude, web pages, GitHub, Notion, and other sources.

It focuses on one common pain: pasted Markdown tables, headings, and code blocks often look broken in Logseq. Logseq-MD gives you a small draggable panel and one-click repair button, while keeping your content local.

Logseq-MD overview

Features

  • One-click repair from a draggable panel.
  • Repair current block.
  • Repair selected blocks.
  • Normalize Markdown tables.
  • Recover Logseq vertical table fragments from AI/web paste.
  • Recover malformed intermediate tables from previous repair attempts.
  • Fix heading spacing, such as ##Title to ## Title.
  • Clean extra blank lines conservatively.
  • Protect fenced code blocks.
  • Copy diagnostics without exposing note content.

Privacy

Logseq-MD runs locally inside Logseq.

  • No network requests.
  • No AI API calls.
  • No telemetry.
  • No note content upload.
  • Diagnostics include counts, command names, warnings, and errors, but not your original note text.

Install For Local Testing

  1. Download the latest release zip from the GitHub Releases page.
  2. Unzip it.
  3. In Logseq, open Settings.
  4. Enable Developer mode.
  5. Open Plugins.
  6. Choose Load unpacked plugin.
  7. Select the unzipped plugin folder.

Install From Source

npm install
npm run build

Then load this project folder in Logseq developer mode.

Usage

  1. Paste Markdown into Logseq.
  2. Open the Logseq-MD panel from the toolbar.
  3. Put the cursor in a block, or select the blocks you want to repair.
  4. Click 一键修复.

The panel can be dragged by its header.

You can also use slash commands:

  • Logseq-MD: Repair current block
  • Logseq-MD: Repair selected blocks
  • Logseq-MD: Repair Markdown table
  • Logseq-MD: Open status panel

Development

npm install
npm test
npm run typecheck
npm run build

Marketplace Preparation

This repository is structured for a future Logseq Marketplace submission:

  • manifest.json is at the repository root.
  • README.md explains what the plugin does and how to use it.
  • The README includes an image showing the plugin workflow.
  • .github/workflows/publish.yml builds a release zip when a GitHub release is created.

Before marketplace submission, test the release zip with real Logseq content and then submit a PR to logseq/marketplace.

License

MIT


简体中文

Logseq-MD 是一个本地优先的 Logseq 插件,用来修复从 ChatGPT、Claude、网页、GitHub、Notion 等来源复制 Markdown 后,粘贴到 Logseq 中出现的显示错误。

它解决的核心问题是:Markdown 表格、标题、代码块、空行在 Logseq 里经常被粘贴坏。Logseq-MD 提供一个可拖动的小面板和一键修复按钮,所有修复都在本地完成。

Logseq-MD 概览

功能

  • 面板一键修复。
  • 面板可拖动,避免挡住侧边栏或正文。
  • 修复当前 block。
  • 修复选中 blocks。
  • 规范 Markdown 表格。
  • 修复 AI 或网页粘贴后形成的竖向碎片表格。
  • 修复已经被错误处理过的中间坏表格。
  • 修复标题空格,例如 ##标题 变成 ## 标题。
  • 保守清理多余空行。
  • 保护 fenced code block,不误伤代码块内容。
  • 可复制诊断信息,且诊断信息不包含笔记原文。

隐私

Logseq-MD 在 Logseq 本地运行。

  • 不联网。
  • 不调用 AI API。
  • 不上传笔记内容。
  • 不做 telemetry。
  • 诊断信息只包含命令、数量、结果、warning、error,不包含你的笔记原文。

本地测试安装

  1. 从 GitHub Releases 下载最新版 zip。
  2. 解压 zip。
  3. 打开 Logseq 的 Settings。
  4. 启用 Developer mode。
  5. 打开 Plugins。
  6. 选择 Load unpacked plugin。
  7. 选择解压后的插件文件夹。

从源码安装

npm install
npm run build

然后在 Logseq 开发者模式中加载这个项目文件夹。

使用方法

  1. 把 Markdown 粘贴到 Logseq。
  2. 从工具栏打开 Logseq-MD 面板。
  3. 把光标放在要修复的 block,或选中多个 blocks。
  4. 点击 一键修复。

面板顶部可以拖动。

也可以使用 slash commands:

  • Logseq-MD: Repair current block
  • Logseq-MD: Repair selected blocks
  • Logseq-MD: Repair Markdown table
  • Logseq-MD: Open status panel

开发命令

npm install
npm test
npm run typecheck
npm run build

Logseq 插件市场准备

这个仓库已经按后续提交 Logseq Marketplace 的方向整理:

  • 根目录有 manifest.json。
  • README.md 说明插件功能和使用方法。
  • README 中包含插件效果图片。
  • .github/workflows/publish.yml 会在创建 GitHub Release 时自动构建 release zip。

提交插件市场前,需要先用 release zip 在真实 Logseq 内容里测试,然后向 logseq/marketplace 提交 PR。

许可证

MIT

About

Logseq plugin for repairing pasted Markdown from AI tools and web sources

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages