Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: video width use css control

shuaief89efdf7d1a
diff --git a/ui/src/components/Editor/utils/index.ts b/ui/src/components/Editor/utils/index.ts
index f12df1fb..a617989b 100644
--- a/ui/src/components/Editor/utils/index.ts
+++ b/ui/src/components/Editor/utils/index.ts
@@ -141,9 +141,4 @@ export function htmlRender(el: HTMLElement | null) {
table.parentNode?.replaceChild(div, table);
div.appendChild(table);
});
-
- // video width 100%
- el.querySelectorAll('video').forEach((video) => {
- video.style.width = '100%';
- });
}
diff --git a/ui/src/index.scss b/ui/src/index.scss
index dba18feb..4e45b330 100644
--- a/ui/src/index.scss
+++ b/ui/src/index.scss
@@ -218,6 +218,9 @@ img:not(a img, img.broken) {
img {
max-width: 100%;
}
+ video {
+ max-width: 100%;
+ }
p {
> code {
background-color: #e9ecef;