joplin-plugin-copy-as-html 1.6.8 → 1.7.2

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/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 bwat47
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
1
+ MIT License
2
+
3
+ Copyright (c) 2025 bwat47
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
21
  SOFTWARE.
package/README.md CHANGED
@@ -37,6 +37,8 @@ Successfully embedded remote images can be viewed without internet access. If a
37
37
 
38
38
  Drawings from Freehand Drawing, Excalidraw, and Drawio are supported when stored as Joplin image resources (embedded like any other image resource).
39
39
 
40
+ Mermaid Diagrams, Math, and ABC Music notation will be embedded as SVG images (or converted to PNG if Convert SVG Images to PNG is enabled).
41
+
40
42
  ### HTML fragment or full document
41
43
 
42
44
  - **Default:** Copies an HTML fragment without an added stylesheet. The destination app determines its appearance.
@@ -46,10 +48,7 @@ To use custom CSS, create `copy-as-html-user.css` in your Joplin profile directo
46
48
 
47
49
  ### Markdown rendering
48
50
 
49
- HTML output follows Joplin's Markdown rendering settings, including options such as footnotes, highlighting, and tables.
50
-
51
- <details>
52
- <summary>Supported optional Markdown settings</summary>
51
+ HTML output follows Joplin's Markdown rendering settings, supporting the following:
53
52
 
54
53
  - Soft Breaks
55
54
  - Typographer
@@ -64,27 +63,30 @@ HTML output follows Joplin's Markdown rendering settings, including options such
64
63
  - Markdown Emoji
65
64
  - Insert (`++Insert++`)
66
65
  - Multimarkdown Table
67
-
68
- </details>
66
+ - Mermaid Diagrams
67
+ - Math
68
+ - ABC Musical Notation
69
69
 
70
70
  ## Plain text options
71
71
 
72
72
  Plain text output removes Markdown formatting markers and images while preserving paragraphs, list markers, nested list indentation, readable tables, footnotes, and link text. It parses Markdown independently of Joplin's HTML rendering settings.
73
73
 
74
- | Setting | Default | Options |
75
- | ----------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------- |
76
- | Plain text hyperlink behavior | Link Title | Keep link text, show the URL, or preserve Markdown link formatting. Applies to Markdown links with HTTP/HTTPS URLs. |
77
- | List indentation type | 4 Spaces | Indent nested lists with four spaces or tabs. |
78
- | List spacing | Loose | Loose adds blank lines between list items; Tight omits them. |
79
- | Display emojis | On | Converts emoji shortcodes such as `:white_check_mark:` to Unicode (✅). |
80
- | Preserve table pipes | Off | Retains Markdown pipe separators in tables. |
74
+ | Setting | Default | Options |
75
+ | ----------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
76
+ | Plain text hyperlink behavior | Link Title | Keep link text, show the URL, or preserve Markdown link formatting. Applies to Markdown links with HTTP/HTTPS URLs. |
77
+ | List indentation type | 4 Spaces | Indent nested lists with four spaces or tabs. |
78
+ | List spacing | Loose | Loose adds blank lines between list items; Tight omits them. |
79
+ | Convert emoji shortcodes | On | Converts emoji shortcodes such as `:white_check_mark:` to Unicode (✅) when enabled; leaves shortcodes unchanged when disabled. |
80
+ | Preserve table pipes | Off | Retains Markdown pipe separators in tables. |
81
81
 
82
82
  You can also preserve superscript, subscript, emphasis, bold, heading, quote, strikethrough, highlight, and insert markers, horizontal rules, and code backticks. These options are off by default and appear when you enable **Show advanced settings** in the plugin's settings section.
83
83
 
84
84
  ## Limitations
85
85
 
86
86
  - Commands work on selected text in the Markdown editor. They do not work in the rich text editor or Markdown viewer.
87
- - Mermaid diagrams and math are not rendered; they are copied as plain text.
87
+ - Math is rendered as images with [MathJax](https://www.mathjax.org/) when copying as HTML, so it may look slightly different from Joplin's viewer. Math MathJax cannot render is copied as its TeX source. Plain text copies keep the TeX source.
88
+ - Mermaid diagrams are rendered as images with [Pele](https://github.com/obsidianmd/pele) when copying as HTML, so they may look different from Joplin's viewer. Diagrams Pele cannot render are copied as code. Plain text copies keep the diagram source.
89
+ - ABC music notation is rendered as images with [abcjs](https://www.abcjs.net/) when copying as HTML. Notation abcjs cannot render is copied as code. Plain text copies keep the ABC source.
88
90
  - HTML styling and embedded image support depend on the destination app.
89
91
 
90
92
  > [!NOTE]
package/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "joplin-plugin-copy-as-html",
3
- "version": "1.6.8",
3
+ "version": "1.7.2",
4
4
  "scripts": {
5
- "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
5
+ "dist": "npm run typecheck && joplin-plugin-scripts build",
6
6
  "prepare": "npm run dist",
7
- "updateVersion": "webpack --env joplin-plugin-config=updateVersion",
8
- "update": "npm install -g generator-joplin && yo joplin --node-package-manager npm --update --force",
9
- "lint": "eslint --ext .ts src/",
10
- "lint:fix": "eslint --ext .ts src/ --fix",
11
- "format": "prettier --write \"src/**/*.ts\"",
7
+ "updateVersion": "joplin-plugin-scripts update-version",
8
+ "updateApi": "joplin-plugin-scripts update-api",
9
+ "typecheck": "tsc --noEmit",
10
+ "lint": "oxlint src/ && npm run lint:dead-code && npm run lint:complexity",
11
+ "lint:fix": "oxlint src/ --fix",
12
+ "format": "oxfmt --write",
13
+ "format:check": "oxfmt --check",
12
14
  "test": "vitest run",
13
- "knip": "knip"
15
+ "lint:dead-code": "fallow dead-code",
16
+ "lint:complexity": "fallow health --complexity"
14
17
  },
15
18
  "license": "MIT",
19
+ "engines": {
20
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
21
+ },
16
22
  "keywords": [
17
23
  "joplin-plugin"
18
24
  ],
@@ -20,33 +26,25 @@
20
26
  "publish"
21
27
  ],
22
28
  "devDependencies": {
23
- "@eslint/js": "^10.0.1",
29
+ "@bwat47/joplin-plugin-scripts": "^1.7.0",
24
30
  "@types/jsdom": "^30.0.0",
25
- "@types/mdast": "^4.0.4",
26
- "@types/node": "^25.9.4",
27
- "@vitest/eslint-plugin": "^1.6.27",
28
- "chalk": "^4.1.0",
29
- "copy-webpack-plugin": "^14.0.0",
30
- "eslint": "^10.12.0",
31
- "eslint-config-prettier": "^10.1.8",
32
- "eslint-plugin-sonarjs": "^4.2.2",
33
- "fs-extra": "^11.3.2",
34
- "glob": "^8.0.3",
35
- "globals": "^14.0.0",
36
- "jsdom": "^30.1.2",
37
- "knip": "^6.40.0",
38
- "prettier": "^3.9.9 ",
39
- "tar": "^7.5.7",
40
- "ts-loader": "^9.5.7",
41
- "typescript": "^6.0.3",
42
- "typescript-eslint": "^8.71.1",
43
- "vitest": "^5.0.0",
44
- "webpack": "^5.103.0",
45
- "webpack-cli": "^6.0.1"
31
+ "@types/node": "^24.19.2",
32
+ "eslint-plugin-regexp": "^3.3.3",
33
+ "fallow": "^3.43.0",
34
+ "jsdom": "^31.0.1",
35
+ "oxfmt": "^0.78.0",
36
+ "oxlint": "^1.93.0",
37
+ "oxlint-tsgolint": "^7.0.2007",
38
+ "typescript": "^7.0.2",
39
+ "vitest": "^5.1.0"
46
40
  },
47
41
  "dependencies": {
48
- "dompurify": "^3.4.16",
49
- "node-emoji": "^2.2.0",
42
+ "@mathjax/mathjax-mhchem-font-extension": "^4.1.3",
43
+ "@mathjax/mathjax-tex-font": "^4.1.3",
44
+ "@mathjax/src": "^4.1.3",
45
+ "abcjs": "^6.7.3",
46
+ "dompurify": "^3.4.18",
47
+ "pele": "^1.13.0",
50
48
  "remark-emoji": "^5.0.2",
51
49
  "remark-flexible-markers": "^1.3.4",
52
50
  "remark-gfm": "^4.0.1",
Binary file
@@ -1,53 +1,53 @@
1
1
  {
2
- "manifest_version": 1,
3
- "id": "com.bwat47.copyashtml",
4
- "app_min_version": "3.5.11",
5
- "version": "1.6.8",
6
- "name": "Copy as HTML",
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
- "author": "bwat47",
9
- "homepage_url": "https://github.com/bwat47/joplin-copy-as-html",
10
- "repository_url": "https://github.com/bwat47/joplin-copy-as-html",
11
- "keywords": [
12
- "copy",
13
- "html",
14
- "text",
15
- "images",
16
- "image"
17
- ],
18
- "categories": [
19
- "productivity",
20
- "editor"
21
- ],
22
- "screenshots": [
23
- {
24
- "src": "images/copy-as-html1.png",
25
- "label": "Copy as HTML example 1"
26
- },
27
- {
28
- "src": "images/copy-as-html2.png",
29
- "label": "Copy as HTML example 2"
30
- },
31
- {
32
- "src": "images/copy-as-plain1.png",
33
- "label": "Copy as Plain Text example 1"
34
- },
35
- {
36
- "src": "images/copy-as-plain2.png",
37
- "label": "Copy as Plain Text example 2"
38
- }
39
- ],
40
- "icons": {
41
- "16": "images/16.png",
42
- "32": "images/32.png",
43
- "48": "images/48.png",
44
- "64": "images/64.png",
45
- "128": "images/128.png"
46
- },
47
- "promo_tile": {
48
- "src": "images/copyashtml_promo_tile.png",
49
- "label": "Copy as HTML Promo Tile"
50
- },
51
- "_publish_hash": "sha256:847d098a13a70b2759e790186942d129318d3dcd8c44f9d38ca9d89521738be9",
52
- "_publish_commit": "main:09682b093125a2ad546b45afcf938f869ca92361"
53
- }
2
+ "manifest_version": 1,
3
+ "id": "com.bwat47.copyashtml",
4
+ "app_min_version": "3.5.11",
5
+ "version": "1.7.2",
6
+ "name": "Copy as HTML",
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
+ "author": "bwat47",
9
+ "homepage_url": "https://github.com/bwat47/joplin-copy-as-html",
10
+ "repository_url": "https://github.com/bwat47/joplin-copy-as-html",
11
+ "keywords": [
12
+ "copy",
13
+ "html",
14
+ "text",
15
+ "images",
16
+ "image"
17
+ ],
18
+ "categories": [
19
+ "productivity",
20
+ "editor"
21
+ ],
22
+ "screenshots": [
23
+ {
24
+ "src": "images/copy-as-html1.png",
25
+ "label": "Copy as HTML example 1"
26
+ },
27
+ {
28
+ "src": "images/copy-as-html2.png",
29
+ "label": "Copy as HTML example 2"
30
+ },
31
+ {
32
+ "src": "images/copy-as-plain1.png",
33
+ "label": "Copy as Plain Text example 1"
34
+ },
35
+ {
36
+ "src": "images/copy-as-plain2.png",
37
+ "label": "Copy as Plain Text example 2"
38
+ }
39
+ ],
40
+ "icons": {
41
+ "16": "images/16.png",
42
+ "32": "images/32.png",
43
+ "48": "images/48.png",
44
+ "64": "images/64.png",
45
+ "128": "images/128.png"
46
+ },
47
+ "promo_tile": {
48
+ "src": "images/copyashtml_promo_tile.png",
49
+ "label": "Copy as HTML Promo Tile"
50
+ },
51
+ "_publish_hash": "sha256:ca048454eaa003d4a0962e4da7ff8481c524bf5af8e7ebe55373bbf9402ea47a",
52
+ "_publish_commit": "main:60ed3e9dfa46c31aed436626d337d50d9d844cec"
53
+ }
@@ -1 +0,0 @@
1
- /*! For license information please see index.js.LICENSE.txt */