README file from
GithubCopy to WeChat
An Obsidian plugin that copies your notes to WeChat — either as chat-friendly plain text or as a rendered image — straight to the clipboard.
WeChat's chat box does not render rich text, and pasting Markdown there looks messy. This plugin gives you two purpose-built copy actions instead.
Features
- Copy to WeChat (text) — converts the current selection (or the whole note) into clean plain text tuned for WeChat chat:
- Headings →
【Title】(H1/H2) and「Title」(H3+) - Unordered lists →
•/◦/▪by depth, indented with full-width spaces (WeChat keeps these; it collapses leading half-width spaces) - Ordered lists keep their numbers; task lists become
☐/☑ - Quotes →
|, horizontal rules →———————— - Tables collapse the
|---|separator and join cells with| - Bold / italic / strikethrough / inline code are stripped to plain text; links become
text(url)(bare URLs and autolinks are kept as-is so WeChat makes them tappable); images become[图片:alt]
- Headings →
- Copy as image — renders the note with a clean article theme and rasterizes it to a PNG on the clipboard, preserving line breaks and indentation.
Usage
Right-click in the editor and choose:
- 复制到微信 / Copy to WeChat — plain text
- 以图片复制 / Copy as image — PNG image
Both are also available from the Command Palette (Cmd/Ctrl+P), so you can bind hotkeys.
If text is selected, only the selection is converted; otherwise the whole note is used.
Desktop only. Copying images to the clipboard relies on desktop APIs.
Installation
From Community Plugins (once published)
Settings → Community plugins → Browse → search "Copy to WeChat" → Install → Enable.
Manual
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Copy them into
<vault>/.obsidian/plugins/copy-to-wechat/. - Reload Obsidian and enable the plugin under Community plugins.
Build from source
npm install
npm run build # produces main.js
npm test # run the unit tests
For development, npm run dev rebuilds on change.
License
MIT © jerryshi