修改
This commit is contained in:
parent
9f224e0631
commit
5c320ebc54
@ -239,7 +239,7 @@ export default {
|
||||
// 获取光标位置:当编辑器中没有输入文本时,这里获取到的 range 为 null
|
||||
let index = range ? range : 0;
|
||||
// 在光标所在位置 插入视频
|
||||
this.Quill.insertEmbed(index, "video", { url: videoLink, poster: 'https://7up.pics/images/2024/01/23/101sh.png' });
|
||||
this.Quill.insertEmbed(index, "video", { url: videoLink });
|
||||
// 调整光标到最后
|
||||
this.Quill.setSelection(index + 1);
|
||||
},
|
||||
|
||||
@ -11,7 +11,7 @@ class Video extends BlockEmbed {
|
||||
static create(value) {
|
||||
const node = super.create();
|
||||
// 添加video标签所需的属性
|
||||
node.setAttribute('style', 'object-fit:fill;width: 30%;')
|
||||
node.setAttribute('style', 'object-fit:fill;width: 100%;')
|
||||
node.setAttribute('preload', 'auto') // auto - 当页面加载后载入整个视频 meta - 当页面加载后只载入元数据 none - 当页面加载后不载入视频
|
||||
// node.setAttribute('playsinline', 'true')
|
||||
// node.setAttribute('x-webkit-airplay', 'allow')
|
||||
|
||||
@ -1178,6 +1178,12 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .ql-editor {
|
||||
::v-deep .ql-video {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.articleSummary {
|
||||
::v-deep .el-textarea__inner {
|
||||
height: 100px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user