You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can enable previsualization of HTML code within Marp Markdown with the `markdown.marp.enableHtml` option.
210
+
In the trusted workspace, if Marp Markdown was included HTML elements, [only selectivity HTML elements by Marp](https://github.com/marp-team/marp-core/blob/main/src/html/allowlist.ts) can render by default. You can control which HTML elements will be rendered by setting the `markdown.marp.html` option,
211
211
212
-
It could allow script injection from untrusted Markdown files. Thus, this feature is disabled as a default and will be _always ignored in the untrusted workspace_. Use with caution.
212
+
You can control which HTML elements will be rendered by setting the `markdown.marp.html` option. You can set it as `all` to allow all HTML elements, but could allow script injection from untrusted Markdown files. Use with caution.
213
+
214
+
In the untrusted workspace, HTML elements in Marp Markdown will be always ignored regardless of the selected option in `markdown.marp.html`.
215
+
216
+
> [!NOTE]
217
+
> A legacy setting `markdown.marp.enableHtml` is deprecated since v2. Please use `markdown.marp.html` instead.
Copy file name to clipboardExpand all lines: package.json
+21-4Lines changed: 21 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@
50
50
"supported": "limited",
51
51
"description": "Workspace trust is required for exporting slide deck, and using themes configured in the workspace.",
52
52
"restrictedConfigurations": [
53
+
"markdown.marp.html",
53
54
"markdown.marp.enableHtml",
54
55
"markdown.marp.themes"
55
56
]
@@ -119,10 +120,20 @@
119
120
"default": "",
120
121
"description": "Sets the custom path for Chrome or Chromium-based browser to export PDF, PPTX, and image. If it's empty, Marp will find out the installed Google Chrome / Chromium / Microsoft Edge."
121
122
},
122
-
"markdown.marp.enableHtml": {
123
-
"type": "boolean",
124
-
"default": false,
125
-
"description": "Enables all HTML elements in Marp Markdown. This setting is working only in the trusted workspace."
123
+
"markdown.marp.html": {
124
+
"type": "string",
125
+
"enum": [
126
+
"off",
127
+
"default",
128
+
"all"
129
+
],
130
+
"markdownEnumDescriptions": [
131
+
"Disable all HTML elements, including originally allowed HTML elements by Marp.",
132
+
"Enable only selectively enabled HTML elements by Marp. _([See the list of HTML elements](https://github.com/marp-team/marp-core/blob/main/src/html/allowlist.ts))_",
133
+
"Enable all HTML elements. This setting may become the slide rendering insecure."
134
+
],
135
+
"default": "default",
136
+
"description": "Sets which HTML elements within Marp Markdown are enabled in rendered slides. If the workspace is not trusted, this setting treats as always \"off\"."
126
137
},
127
138
"markdown.marp.exportType": {
128
139
"type": "string",
@@ -197,6 +208,12 @@
197
208
"items": {
198
209
"type": "string"
199
210
}
211
+
},
212
+
"markdown.marp.enableHtml": {
213
+
"type": "boolean",
214
+
"default": false,
215
+
"description": "Enables all HTML elements in Marp Markdown. This setting is working only in the trusted workspace.",
216
+
"deprecationMessage": "The setting \"markdown.marp.enableHtml\" is deprecated. Please use \"markdown.marp.html\" instead."
'The setting "markdown.marp.enableHtml" is deprecated. Please use "markdown.marp.html" instead. Please review your settings JSON to make silence this warning.',
0 commit comments