joplin-plugin-copy-as-html 1.0.13 → 1.0.15

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,9 @@
3
3
  > [!important]
4
4
  > My coding knowledge is currently very limited. This plugin was created entirely with AI tools, and I may be limited in my ability to fix any issues.
5
5
 
6
- This plugin allows you to copy selected text in the markdown editor as either HTML or plaintext (with markdown formatting characters removed).
6
+ This plugin allows you to copy selected text in the markdown editor as either HTML or plain text (with markdown formatting characters removed).
7
7
 
8
- The primary use case is copying text from Joplin and pasting formatted text into other apps that support HTML formatting (e.g. pasting text into an Outlook email).
8
+ The primary use case is copying text from Joplin and pasting formatted text into other apps that support HTML formatting (e.g. pasting text into an Outlook email). A plain text fallback is provided for scenarios where you need to paste text into an application that supports neither HTML formatting nor markdown.
9
9
 
10
10
  ## Copy as HTML
11
11
 
@@ -13,31 +13,33 @@ The primary use case is copying text from Joplin and pasting formatted text into
13
13
 
14
14
  This will populate the clipboard's text/html category with the HTML formatted text.
15
15
 
16
- > [!important]
16
+ > [!note]
17
17
  > By design, the plugin only copies an HTML fragment including the basic semantic HTML markup (i.e. it won't include any of the Joplin theme styling). This is for maximum compatibility with pasting into other apps, so you don't see issues such as Joplin's background color being pasted- you'll just get the formatted text (bold, italics, formatted lists, etc...).
18
18
 
19
19
  ### Embed images as base64
20
20
 
21
21
  By default, the plugin will embed any images as base64 in the text/html output, allowing you paste text + images into external applications. However, this can be disabled in the plugin's settings.
22
22
 
23
- This should work with both markdown image embeds and the html img src embeds that you get when resizing images via joplin's rich text editor.
23
+ This should work with both markdown image embeds and the html `<img>` embeds that you get when resizing images via joplin's rich text editor.
24
24
 
25
25
  ### Optional markdown syntax
26
26
 
27
27
  The plugin will adhere to Joplin's settings for whether or not to render:
28
28
 
29
29
  - Soft Breaks
30
- - ^sup^
31
- - ~sub~
32
- - ==mark==
30
+ - `^sup^`
31
+ - `~sub~`
32
+ - `==mark==`
33
33
 
34
34
  ## Copy as Plain Text
35
35
 
36
36
  "Copy selection as Plain Text" is provided as a right click context menu option and as a keyboard shortcut (ctrl + alt + c by default).
37
37
 
38
- This will strip the markdown formatting characters from the raw markdown (except for numbered/unordered list markers) and populate it as text/plain in the clipboard, for scenarios where you need to paste into an app that supports neither HTML formatting or markdown.
38
+ This will strip markdown formatting characters, backslash escapes, and image embeds (e.g. `![](:/22cce3a8c2244493877c66c9e3259274)` or `<img src=":/5bb1066cec6f4c849cefc28ba7b0fc1e">`) from the source markdown and populate it as text/plain in the clipboard, for scenarios where you need to paste into an app that supports neither HTML formatting or markdown.
39
+
40
+ List leaders and nested list indentation will be maintained (these are normally lost when copying from the markdown viewer or rich text editor).
39
41
 
40
- As of version 1.0.8, the following options are provided to maintain specific markdown formatting in the plain text output:
42
+ As of version 1.0.8, the following options are provided to preserve specific markdown formatting in the text/plain output:
41
43
 
42
44
  - Preserve superscript characters `(^TEST^)`
43
45
  If enabled, `^TEST^` will remain `^TEST^` in plain text output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-copy-as-html",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
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",
@@ -15,6 +15,8 @@
15
15
  "publish"
16
16
  ],
17
17
  "devDependencies": {
18
+ "@types/jsdom": "^21.1.7",
19
+ "@types/markdown-it": "^14.1.2",
18
20
  "@types/node": "^18.7.13",
19
21
  "chalk": "^4.1.0",
20
22
  "copy-webpack-plugin": "^11.0.0",
Binary file
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 1,
3
3
  "id": "com.bwat47.copyashtml",
4
4
  "app_min_version": "3.3",
5
- "version": "1.0.13",
5
+ "version": "1.0.15",
6
6
  "name": "Copy as HTML",
7
7
  "description": "Allows you to copy text with HTML (rich text) formatting from the markdown editor without excess styling.",
8
8
  "author": "bwat47",
@@ -49,8 +49,19 @@
49
49
  "label": "Preserve heading characters (## TEST)",
50
50
  "description": "If enabled, ## TEST will remain as-is in plain text output.",
51
51
  "value": false
52
+ },
53
+ "hyperlinkBehavior": {
54
+ "type": "enum",
55
+ "label": "Plain Text hyperlink behavior",
56
+ "description": "How external hyperlinks should be displayed in plain text output.",
57
+ "options": {
58
+ "title": "Link Title",
59
+ "url": "Link URL",
60
+ "markdown": "Markdown Format"
61
+ },
62
+ "value": "title"
52
63
  }
53
64
  },
54
- "_publish_hash": "sha256:0b3e2c6ef123ca92b85a73a06d4ae6db096bd2e27edbcbf0244c6828337cd4f6",
55
- "_publish_commit": "main:cf40dcb81156a590815676944d00c50bb8c5424b"
65
+ "_publish_hash": "sha256:eb1340273f810728a3ebedc6d296c1816711c5e2932e3bea3420b3df129a5902",
66
+ "_publish_commit": "main:f161b8114e8b5dcf98ab3115e8a29d4a5f57de07"
56
67
  }