Skip to content

Commit 8d0bc34

Browse files
committed
fix: show video controls when the editor is in edit mode
1 parent 3b413c7 commit 8d0bc34

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/components/TextEditor/InsertVideo.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@
4444
/>
4545
</template>
4646
<template #actions>
47-
<Button variant="solid" @click="addVideo(addVideoDialog.url)">
48-
Insert Video
49-
</Button>
50-
<Button @click="reset">Cancel</Button>
47+
<div class="flex gap-2">
48+
<Button variant="solid" @click="addVideo(addVideoDialog.url)">
49+
Insert Video
50+
</Button>
51+
<Button @click="reset">Cancel</Button>
52+
</div>
5153
</template>
5254
</Dialog>
5355
</template>

src/components/TextEditor/video-extension.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const Video = Node.create({
3838
const video = document.createElement('video')
3939
if (editor.isEditable) {
4040
video.className = 'pointer-events-none'
41+
video.controls = true
4142
}
4243
video.src = node.attrs.src
4344
if (!editor.isEditable) {

0 commit comments

Comments
 (0)