Skip to content

Commit cc2057d

Browse files
committed
Improve metadata, add icons, add README and LICENSE
1 parent 59d215d commit cc2057d

File tree

4 files changed

+83
-5
lines changed

4 files changed

+83
-5
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 lyqed
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
1-
# copy-as-note
1+
# Copy Note Content (Obsidian plugin)
2+
3+
Copy the full **raw Markdown** of the currently-open note to your clipboard.
4+
5+
This plugin is designed to work well on **Obsidian Mobile** (where you can add commands to the toolbar), and also adds a **desktop ribbon icon** for quick access.
6+
7+
## Features
8+
9+
- Copy the full raw text of the active Markdown note (`.md`) to clipboard.
10+
- Mobile-friendly: exposes a command that can be added to the mobile toolbar.
11+
- Desktop-friendly: includes a ribbon icon in the left sidebar.
12+
13+
## How to use
14+
15+
### Mobile (recommended)
16+
17+
1. Open **Settings → Mobile**.
18+
2. Under **Toolbar**, add the command:
19+
- **Copy current note to clipboard**
20+
3. Tap the toolbar button to copy the current note.
21+
22+
### Desktop
23+
24+
- Click the ribbon icon (left sidebar) to copy the current note.
25+
- Or run the command from the Command Palette:
26+
- **Copy current note to clipboard**
27+
28+
## Notes / Limitations
29+
30+
- Only copies Markdown notes (`.md`).
31+
- Copies the raw file content from the vault (not rendered preview).
32+
33+
## Installation
34+
35+
### From Community Plugins (once published)
36+
37+
1. Settings → Community plugins
38+
2. Browse and search for **Copy Note Content**
39+
3. Install and enable
40+
41+
### Manual
42+
43+
1. Download `main.js`, `manifest.json`, and (optionally) `styles.css` from the latest GitHub release.
44+
2. Place them in: `YourVault/.obsidian/plugins/copy-as-note/`
45+
3. Reload Obsidian and enable the plugin.
46+
47+
## License
48+
49+
MIT

main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*
44
* Mobile workflow:
55
* - This plugin exposes a command that can be manually added to the Obsidian Mobile toolbar.
6-
* - It does NOT auto-add a ribbon/status bar icon.
6+
* Desktop workflow:
7+
* - Adds a ribbon icon for quick access.
78
*/
89

910
const { Plugin, Notice } = require('obsidian');
@@ -14,10 +15,16 @@ module.exports = class MobileCopyNotePlugin extends Plugin {
1415
this.addCommand({
1516
id: 'copy-active-note-to-clipboard',
1617
name: 'Copy current note to clipboard',
18+
icon: 'copy',
1719
callback: async () => {
1820
await this.copyCurrentNoteToClipboard();
1921
},
2022
});
23+
24+
// Desktop convenience: show a ribbon icon (left sidebar) that runs the same action.
25+
this.addRibbonIcon('copy', 'Copy current note to clipboard', async () => {
26+
await this.copyCurrentNoteToClipboard();
27+
});
2128
}
2229

2330
async copyCurrentNoteToClipboard() {
@@ -102,3 +109,5 @@ module.exports = class MobileCopyNotePlugin extends Plugin {
102109
}
103110
};
104111

112+
113+

manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"id": "copy-as-note",
3-
"name": "Copy As Note",
3+
"name": "Copy Note Content",
44
"version": "1.0.0",
55
"minAppVersion": "0.15.0",
66
"main": "main.js",
7-
"description": "Adds a mobile-friendly ribbon icon to copy the full raw text of the current note to the clipboard.",
8-
"author": "Obsidian User",
7+
"description": "Copy the full raw Markdown of the current note to your clipboard (mobile toolbar + desktop ribbon).",
8+
"author": "lyqed",
99
"isDesktopOnly": false
1010
}

0 commit comments

Comments
 (0)