joplin-plugin-copy-as-html 1.5.5 → 1.6.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
@@ -1,9 +1,9 @@
1
1
  # Joplin Copy as HTML
2
2
 
3
- > [!important]
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.
3
+ > [!note]
4
+ > This plugin was created entirely with AI tools.
5
5
 
6
- This plugin allows you to copy selected text in the markdown editor as either HTML or plain text (with markdown formatting characters removed).
6
+ This plugin allows you to copy selected text in the markdown editor as either HTML or structured plain text.
7
7
 
8
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
 
@@ -89,33 +89,33 @@ SVG images may have compatibility issues with certain editors/email clients, so
89
89
 
90
90
  "Copy selection as Plain Text" is provided as a right click context menu option and as a keyboard shortcut (ctrl + alt + c by default).
91
91
 
92
- This will strip markdown formatting characters, backslash escapes, and image embeds 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.
93
-
94
- List leaders and nested list indentation will be maintained (these are normally lost when copying plain text from the markdown viewer or rich text editor).
92
+ This command parses the selected Markdown and renders it as paste-friendly plain text. By default it removes all markdown formatting markers and image embeds, while preserving document structure such as paragraphs, list leaders, nested list indentation, tables (optimized for plain text readability), footnotes, and link text.
95
93
 
96
94
  ### Customizing plain text output
97
95
 
98
- The following options are provided to preserve specific markdown formatting in the text/plain output:
96
+ The following options are provided to preserve specific markdown formatting markers in the `text/plain` output when desired:
97
+
98
+ - Preserve superscript markers
99
99
 
100
- - Preserve superscript characters `(^TEST^)`
100
+ - Preserve subscript markers
101
101
 
102
- - Preserve subscript characters `(~TEST~)`
102
+ - Preserve emphasis markers
103
103
 
104
- - Preserve emphasis characters `(*TEST* or _TEST_)`
104
+ - Preserve bold markers
105
105
 
106
- - Preserve bold characters `(**TEST** or __TEST__)`
106
+ - Preserve heading markers
107
107
 
108
- - Preserve heading characters `(## TEST)`
108
+ - Preserve strikethrough markers
109
109
 
110
- - Preserve strikethrough characters (`~~TEST~~`)
110
+ - Preserve horizontal rules
111
111
 
112
- - Preserve horizontal rule (`---`)
112
+ - Preserve highlight markers
113
113
 
114
- - Preserve highlight characters `(==TEST==)`
114
+ - Preserve insert markers
115
115
 
116
- - Preserve insert characters `(++TEST++)`
116
+ - Preserve table pipes
117
117
 
118
- The following options are provided for external hyperlinks (only impacts markdown links containing http/https URL):
118
+ The following options are provided for external hyperlinks (only affects markdown links with `http`/`https` URLs):
119
119
 
120
120
  - Title - Displays link title only (default).
121
121
 
@@ -128,9 +128,14 @@ The following options are provided for indentation style:
128
128
  - Tabs
129
129
  - (4) Spaces (default)
130
130
 
131
+ The following options are provided for list spacing:
132
+
133
+ - Tight - No blank lines between list items.
134
+ - Loose - Adds blank lines between list items (default).
135
+
131
136
  ### Markdown emoji
132
137
 
133
- Copy as Plain Text supports the markdown-it emoji plugin, so emoji such as :white_check_mark: will be displayed in the plain text output. This can be disabled if desired via the Display emojis setting.
138
+ Copy as Plain Text supports markdown emoji shortcodes, so emoji such as :white_check_mark: can be rendered as Unicode in the plain text output. This can be disabled via the Display emojis setting.
134
139
 
135
140
  ## Known Issues
136
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-copy-as-html",
3
- "version": "1.5.5",
3
+ "version": "1.6.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",
@@ -19,49 +19,48 @@
19
19
  "publish"
20
20
  ],
21
21
  "devDependencies": {
22
- "@babel/core": "^7.28.5",
23
- "@babel/preset-env": "^7.28.5",
24
- "@eslint/eslintrc": "^3.3.3",
25
- "@eslint/js": "^9.39.1",
26
- "@types/dompurify": "^3.0.5",
22
+ "@babel/core": "^7.29.0",
23
+ "@babel/preset-env": "^7.29.5",
24
+ "@eslint/eslintrc": "^3.3.5",
25
+ "@eslint/js": "^10.0.1",
26
+ "@types/dompurify": "^3.2.0",
27
27
  "@types/jest": "^30.0.0",
28
28
  "@types/jsdom": "^27.0.0",
29
- "@types/markdown-it": "^14.1.2",
30
- "@types/node": "^25.0.0",
31
- "@typescript-eslint/eslint-plugin": "^8.49.0",
32
- "@typescript-eslint/parser": "^8.49.0",
29
+ "@types/mdast": "^4.0.4",
30
+ "@types/node": "^25.6.0",
31
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
32
+ "@typescript-eslint/parser": "^8.59.2",
33
33
  "babel-jest": "^30.2.0",
34
34
  "baseline-browser-mapping": "^2.9.6",
35
35
  "chalk": "^4.1.0",
36
- "copy-webpack-plugin": "^13.0.1",
37
- "eslint": "^9.39.1",
36
+ "copy-webpack-plugin": "^14.0.0",
37
+ "eslint": "^10.3.0",
38
38
  "eslint-config-prettier": "^10.1.8",
39
- "eslint-plugin-import": "^2.32.0",
40
- "eslint-plugin-prettier": "^5.5.4",
39
+ "eslint-plugin-import-x": "^4.16.2",
40
+ "eslint-plugin-prettier": "^5.5.5",
41
41
  "fs-extra": "^11.3.2",
42
42
  "glob": "^8.0.3",
43
- "jest": "^30.2.0",
43
+ "jest": "^30.3.0",
44
44
  "jest-environment-jsdom": "^30.2.0",
45
45
  "jsdom": "^27.3.0",
46
- "prettier": "^3.7.4",
47
- "tar": "^7.5.4",
46
+ "prettier": "^3.8.3",
47
+ "tar": "^7.5.7",
48
48
  "ts-jest": "^29.4.6",
49
- "ts-loader": "^9.3.1",
50
- "typescript": "^5.9.3",
49
+ "ts-loader": "^9.5.7",
50
+ "typescript": "^6.0.3",
51
51
  "webpack": "^5.103.0",
52
52
  "webpack-cli": "^6.0.1"
53
53
  },
54
54
  "dependencies": {
55
- "dompurify": "^3.3.1",
56
- "markdown-it": "^14.1.0",
57
- "markdown-it-emoji": "^3.0.0",
58
- "markdown-it-ins": "^4.0.0",
59
- "markdown-it-mark": "^4.0.0",
60
- "markdown-it-sub": "^2.0.0",
61
- "markdown-it-sup": "^2.0.0",
62
- "string-width": "^8.1.0"
63
- },
64
- "overrides": {
65
- "parse5": "^7.3.0"
55
+ "dompurify": "^3.4.2",
56
+ "node-emoji": "^2.2.0",
57
+ "remark-emoji": "^5.0.2",
58
+ "remark-flexible-markers": "^1.3.4",
59
+ "remark-gfm": "^4.0.1",
60
+ "remark-ins": "^1.2.4",
61
+ "remark-parse": "^11.0.0",
62
+ "remark-supersub": "^1.0.0",
63
+ "string-width": "^8.1.0",
64
+ "unified": "^11.0.5"
66
65
  }
67
66
  }
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.5.5",
5
+ "version": "1.6.0",
6
6
  "name": "Copy as HTML",
7
7
  "description": "Allows you to copy text with HTML (rich text) formatting from the markdown editor (including images). Also allows you to copy as plain text (without markdown formatting)",
8
8
  "author": "bwat47",
@@ -75,67 +75,61 @@
75
75
  },
76
76
  "preserveSuperscript": {
77
77
  "type": "bool",
78
- "label": "Preserve superscript characters (^TEST^)",
79
- "description": "If enabled, ^TEST^ will remain ^TEST^ in plain text output.",
78
+ "label": "Preserve superscript markers",
79
+ "description": "If enabled, superscript markers will be preserved in plain text output.",
80
80
  "value": false
81
81
  },
82
82
  "preserveSubscript": {
83
83
  "type": "bool",
84
- "label": "Preserve subscript characters (~TEST~)",
85
- "description": "If enabled, ~TEST~ will remain ~TEST~ in plain text output.",
84
+ "label": "Preserve subscript markers",
85
+ "description": "If enabled, subscript markers will be preserved in plain text output.",
86
86
  "value": false
87
87
  },
88
88
  "preserveEmphasis": {
89
89
  "type": "bool",
90
- "label": "Preserve emphasis characters (*TEST* or _TEST_)",
91
- "description": "If enabled, *TEST* or _TEST_ will remain as-is in plain text output.",
90
+ "label": "Preserve emphasis markers",
91
+ "description": "If enabled, emphasis markers will be preserved in plain text output.",
92
92
  "value": false
93
93
  },
94
94
  "preserveBold": {
95
95
  "type": "bool",
96
- "label": "Preserve bold characters (**TEST** or __TEST__)",
97
- "description": "If enabled, **TEST** or __TEST__ will remain as-is in plain text output.",
96
+ "label": "Preserve bold markers",
97
+ "description": "If enabled, bold markers will be preserved in plain text output.",
98
98
  "value": false
99
99
  },
100
100
  "preserveHeading": {
101
101
  "type": "bool",
102
- "label": "Preserve heading characters (## TEST)",
103
- "description": "If enabled, ## TEST will remain as-is in plain text output.",
102
+ "label": "Preserve heading markers",
103
+ "description": "If enabled, heading markers will be preserved in plain text output.",
104
104
  "value": false
105
105
  },
106
106
  "preserveStrikethrough": {
107
107
  "type": "bool",
108
- "label": "Preserve strikethrough characters (~~TEST~~)",
109
- "description": "If enabled, ~~TEST~~ will remain as-is in plain text output.",
108
+ "label": "Preserve strikethrough markers",
109
+ "description": "If enabled, strikethrough markers will be preserved in plain text output.",
110
110
  "value": false
111
111
  },
112
112
  "preserveHorizontalRule": {
113
113
  "type": "bool",
114
- "label": "Preserve horizontal rule (---)",
115
- "description": "If enabled, horizontal rules will be preserved as --- in plain text output.",
114
+ "label": "Preserve horizontal rules",
115
+ "description": "If enabled, horizontal rules will be preserved in plain text output.",
116
116
  "value": false
117
117
  },
118
118
  "preserveMark": {
119
119
  "type": "bool",
120
- "label": "Preserve highlight characters (==TEST==)",
121
- "description": "If enabled, ==TEST== will remain as-is in plain text output.",
120
+ "label": "Preserve highlight markers",
121
+ "description": "If enabled, highlight markers will be preserved in plain text output.",
122
122
  "value": false
123
123
  },
124
124
  "preserveInsert": {
125
125
  "type": "bool",
126
- "label": "Preserve insert characters (++TEST++)",
127
- "description": "If enabled, ++TEST++ will remain as-is in plain text output.",
126
+ "label": "Preserve insert markers",
127
+ "description": "If enabled, insert markers will be preserved in plain text output.",
128
128
  "value": false
129
129
  },
130
- "displayEmojis": {
131
- "type": "bool",
132
- "label": "Display emojis",
133
- "description": "If enabled, emojis will be displayed in the plain text output.",
134
- "value": true
135
- },
136
130
  "hyperlinkBehavior": {
137
131
  "type": "enum",
138
- "label": "Plain Text hyperlink behavior",
132
+ "label": "Plain text hyperlink behavior",
139
133
  "description": "How external HTTP/HTTPS links should appear in plain text output.",
140
134
  "options": {
141
135
  "title": "Link Title",
@@ -153,8 +147,30 @@
153
147
  "tabs": "Tabs"
154
148
  },
155
149
  "value": "spaces"
150
+ },
151
+ "listSpacing": {
152
+ "type": "enum",
153
+ "label": "List spacing",
154
+ "description": "Whether plain text lists should include blank lines between list items.",
155
+ "options": {
156
+ "tight": "Tight",
157
+ "loose": "Loose"
158
+ },
159
+ "value": "loose"
160
+ },
161
+ "displayEmojis": {
162
+ "type": "bool",
163
+ "label": "Display emojis",
164
+ "description": "If enabled, emojis will be displayed in the plain text output.",
165
+ "value": true
166
+ },
167
+ "preserveTablePipes": {
168
+ "type": "bool",
169
+ "label": "Preserve table pipes",
170
+ "description": "If enabled, markdown pipe separators will be preserved in plain text output.",
171
+ "value": false
156
172
  }
157
173
  },
158
- "_publish_hash": "sha256:cbedb37094ddf5cbe1939a41c842e8a839ad47741eefd99c8cc29b4cc85d8230",
159
- "_publish_commit": "main:c18022277d44ad9b2c290d9b0c19f9e79ce5c704"
174
+ "_publish_hash": "sha256:7593505cdc13213cdb631b5de4c88ba83ad3a6edc13a0c32b7f2d6ee0cbc1376",
175
+ "_publish_commit": "main:7855c3152d1d6c4b62040b1f6530fae9b1e0fbeb"
160
176
  }