Skip to content

Commit

Permalink
Merge pull request #212 from RitvikSardana/video-control
Browse files Browse the repository at this point in the history
fix: show video controls when the editor is in edit mode
  • Loading branch information
RitvikSardana authored Nov 5, 2024
2 parents 2e14f0e + 8d0bc34 commit d0ede35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/TextEditor/InsertVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@
/>
</template>
<template #actions>
<Button variant="solid" @click="addVideo(addVideoDialog.url)">
Insert Video
</Button>
<Button @click="reset">Cancel</Button>
<div class="flex gap-2">
<Button variant="solid" @click="addVideo(addVideoDialog.url)">
Insert Video
</Button>
<Button @click="reset">Cancel</Button>
</div>
</template>
</Dialog>
</template>
Expand Down
1 change: 1 addition & 0 deletions src/components/TextEditor/video-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Video = Node.create({
const video = document.createElement('video')
if (editor.isEditable) {
video.className = 'pointer-events-none'
video.controls = true
}
video.src = node.attrs.src
if (!editor.isEditable) {
Expand Down

0 comments on commit d0ede35

Please sign in to comment.