1.富文本视频更新

sws 2024-08-23
v1.0.0
sws 2024-08-23 17:59:27 +08:00
parent 281614cb1e
commit d09dc925f1
2 changed files with 7 additions and 21 deletions

View File

@ -32,10 +32,7 @@ const safe_conten = computed(() => DOMPurify.sanitize(content.value));
.rich-text-content {
white-space: normal;
word-break: break-all;
img {
max-width: 100%;
}
video {
* {
max-width: 100%;
}
}

View File

@ -81,23 +81,15 @@ const upload_list_change = (arry: uploadList[]) => {
arry.forEach((item: uploadList) => {
const url = item.url;
const alt = item.title;
// if (rich_upload_type.value === 'img') {
// new_html += `<img src="${url}" alt="${alt}" />`;
// } else if (rich_upload_type.value === 'video') {
// new_html += `<video src="${url}" />`;
// }
//
upload_insert.value(url, alt);
if (rich_upload_type.value == 'img') {
upload_insert.value(url, alt);
} else {
upload_insert.value(url);
}
});
//
upload_insert.value = null;
//
// if (editor.isDisabled()) editor.enable();
// if (!editor.isFocused()) editor.focus();
// editor.select(cursor_position.value);
// // editor.deleteFragment();
// editor.dangerouslyInsertHtml(new_html);
}
upload_list.value = [];
};
@ -114,10 +106,7 @@ onBeforeUnmount(() => {
position: relative;
height: calc(100vh - 42.5rem) !important;
overflow-y: hidden;
img {
max-width: 100%;
}
video {
* {
max-width: 100%;
}
}