Skip to content

Commit dfe7a27

Browse files
committed
🐛 Fix several issues in media render.
1 parent 0287ce2 commit dfe7a27

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- 🐛 修复单页文章加载Vditor资源时 version 未成功替换问题 `#27`
66
- 🐛 添加遗漏的 plantuml 渲染器 `#28`
7+
- 🐛 修复多媒体链接无法渲染的问题
8+
- 🐛 修复多媒体渲染的大小问题
79

810
### v1.6.0
911

Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
vditorRender.addExternal((conf) => {
22
console.log("Run External Function: Media Render!")
3-
let mediaRenderOption = document.getElementById("vditor-render").dataset.mediarender
4-
if (mediaRenderOption==="true") {
5-
let article = document.getElementById("vditor-render").parentElement;
6-
Vditor.mediaRender(article)
7-
}
3+
let root = document.getElementById("vditor-article-sign").parentElement;
4+
Vditor.mediaRender(root)
85
})

src/main/resources/static/themes/dark.css

+14
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@ Modified from vditor content_theme
1111
.language-graphviz polygon {
1212
fill: rgba(66, 133, 244, .36);
1313
}
14+
15+
.vditor-reset .iframe__video {
16+
display: block;
17+
margin: 0 auto !important;
18+
min-width: 80%;
19+
min-height: 36vh;
20+
border: none;
21+
}
22+
23+
.vditor-reset video {
24+
display: block;
25+
margin: 0 auto !important;
26+
min-width: 80%;
27+
}
+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
/**
22
This is a theme for halo-plugin-vditor
33
Modified from vditor content_theme
4-
*/
4+
*/
5+
6+
.vditor-reset .iframe__video {
7+
display: block;
8+
margin: 0 auto !important;
9+
min-width: 80%;
10+
min-height: 36vh;
11+
border: none;
12+
}
13+
14+
.vditor-reset video {
15+
display: block;
16+
margin: 0 auto !important;
17+
min-width: 80%;
18+
}

0 commit comments

Comments
 (0)