joplin-plugin-codeblock-autocomplete 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
 
4
4
  # Codeblock Autocomplete
5
5
 
6
- Provides auto-complete when creating fenced code blocks by typing backticks/tildes in the markdown editor, plus a few other utilities:
6
+ Provides auto-complete when creating fenced code blocks by typing backticks/tildes in the Markdown editor, plus a few additional code block features:
7
7
 
8
- - Copy button for code blocks in the markdown editor
8
+ - Copy button for code blocks in the Markdown editor
9
+ - Copy button for fenced code blocks in the Markdown viewer (and Rich Text editor)
9
10
  - Toolbar button/Editor command to insert new code block or wrap existing text in a code block
10
11
 
11
12
  Codemirror 6 only, legacy editor is not supported.
@@ -30,16 +31,29 @@ An insert code block command is available via a formatting toolbar icon, Edit me
30
31
 
31
32
  The command supports multiple cursors and selections, and is line-aware (e.g. cursor on line with no selection > invoke command > wraps entire line in code block). Invoking it with a cursor or selection inside an existing fenced code block removes the surrounding fence lines.
32
33
 
33
- ### Copy button
34
+ ### Markdown editor copy button
34
35
 
35
36
  If the copy widget is enabled, you will see the code fence language rendered as a clickable copy button on the top-right of the code block (when the cursor isn't on the opening fence line).
36
37
 
37
38
  Clicking the copy button will copy the code block contents to your clipboard. If the code fence doesn't have a language specified, it will display a generic "Copy" label instead of the language.
38
39
 
40
+ ### Markdown viewer copy button
41
+
42
+ The Markdown viewer has a separate copy-widget setting. When enabled, hovering over a rendered fenced code block shows an icon-only copy button in its top-right corner. The button remains visible on touch devices and can also be reached with the keyboard.
43
+
44
+ Clicking the button copies the fenced code contents and displays a success toast. Indented code blocks, inline code, raw HTML code blocks, and fences that Joplin renders as something other than code (Mermaid, ABC notation, Fountain) are not changed.
45
+
46
+ > [!note]
47
+ > This setting also enables a working copy button in the desktop rich text editor (TinyMCE).
48
+ >
49
+ > It technically works in the mobile (prosemirror) rich text editor as well, however, the prosemirror editor places its own "edit" button on the top right, so the two buttons overlap.
50
+
39
51
  ## Settings
40
52
 
41
53
  Enable language auto-complete - Toggle the language dropdown for code fences. When disabled, typing exactly three backticks or tildes inserts a closing fence immediately without opening the dropdown.
42
54
 
43
55
  Autocomplete languages - Comma-separated list of language identifiers to show in the autocomplete menu.
44
56
 
45
- Enable code block copy widget - Show a copy button on fenced code blocks in the Markdown editor and hide the opening-fence language text when the cursor is not on that line.
57
+ Enable Markdown editor copy widget - Show a copy button on fenced code blocks in the Markdown editor and hide the opening-fence language text when the cursor is not on that line.
58
+
59
+ Enable Markdown viewer copy widget - Show a copy button when hovering over fenced code blocks in the Markdown viewer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-codeblock-autocomplete",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "scripts": {
5
5
  "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
6
6
  "prepare": "npm run dist",
@@ -2,13 +2,13 @@
2
2
  "manifest_version": 1,
3
3
  "id": "com.bwat47.codeblock-autocomplete",
4
4
  "app_min_version": "3.3",
5
- "version": "1.4.0",
5
+ "version": "1.5.0",
6
6
  "platforms": [
7
7
  "desktop",
8
8
  "mobile"
9
9
  ],
10
10
  "name": "Codeblock Autocomplete",
11
- "description": "Code block utilities for the markdown editor: auto-completes fenced code, copy button for code blocks, toolbar button/editor command to create code blocks",
11
+ "description": "Code block utilities for the Markdown editor and viewer: fenced-code autocomplete and copy buttons, plus a command to create code blocks",
12
12
  "author": "bwat47",
13
13
  "homepage_url": "https://github.com/bwat47/joplin-codeblock-autocomplete",
14
14
  "repository_url": "https://github.com/bwat47/joplin-codeblock-autocomplete",
@@ -25,12 +25,21 @@
25
25
  "categories": [
26
26
  "productivity",
27
27
  "developer tools",
28
- "editor"
28
+ "editor",
29
+ "viewer"
29
30
  ],
30
31
  "screenshots": [
31
32
  {
32
33
  "src": "images/screenshot1.png",
33
- "label": "Codeblock Autocomplete Screenshot 1"
34
+ "label": "Code autocomplete example"
35
+ },
36
+ {
37
+ "src": "images/screenshot2.png",
38
+ "label": "Markdown editor copy widget example"
39
+ },
40
+ {
41
+ "src": "images/screenshot3.png",
42
+ "label": "Markdown viewer copy widget example"
34
43
  }
35
44
  ],
36
45
  "icons": {
@@ -44,6 +53,6 @@
44
53
  "src": "images/promo.png",
45
54
  "label": "Codeblock Autocomplete Promo Tile"
46
55
  },
47
- "_publish_hash": "sha256:c3ab271445de6c9e0c076ae330fc01df7a169148aa53a992efdf1dff5f25d5e3",
48
- "_publish_commit": "main:e600fde133f333d52efb405302ff15ca8aafb9ef"
56
+ "_publish_hash": "sha256:a82ea52d75044a6c0c2d6c04333080552038ce50e38b58c3b22d137de1181873",
57
+ "_publish_commit": "main:99794f2e20173bc346855a8c7a269b7bb77debb7"
49
58
  }