Home > front end >  O vue - quill - upload the audio editor
O vue - quill - upload the audio editor

Time:11-04

Have any bosses will help the weak and poor helpless I

CodePudding user response:

Custom upload audio button, use the iframe or audio is inserted into the content

CodePudding user response:

reference 1/f, Qq - CcYy reply:
custom upload audio button, use the iframe or audio is inserted into the content of

I go in audio insert does not support

CodePudding user response:

The import Audio from '../.. Quill/audio '
Quill. Register (Audio, true)

CodePudding user response:

The
reference Qq - CcYy reply: 3/f
import Audio from '../.. Quill/audio '
Quill. Register (Audio, true)

Error could not find../../quill/audio

CodePudding user response:

The
reference Qq - CcYy reply: 3/f
import Audio from '../.. Quill/audio '
Quill. Register (Audio, true)

It's convenient to add WeChat help me see YT15200312339

CodePudding user response:

https://blog.csdn.net/qq_43526066/article/details/92829794

CodePudding user response:

refer to 6th floor Qq - CcYy reply:
https://blog.csdn.net/qq_43526066/article/details/92829794

I am against this article can make the error of add a WeChat look not harass you

CodePudding user response:

 
Let quill=this. $refs. MyQuillEditor. Quill.//get
The let length=quill. Selection. SavedRange. Index;//get focus subscript
Quill. PasteHTML (length, ` & lt; Iframe SRC="https://bbs.csdn.net/topics/static/videos/audio.mp4" & gt; </iframe> `)

CodePudding user response:

 
The import Vue from 'Vue'
Import VueQuillEditor from 'vue - quill - editor'
The import 'quill/dist/quill. Core. CSS'
The import 'quill/dist/quill. Snow. CSS'
The import 'quill/dist/quill. Mercifully. CSS'
Vue. Use (VueQuillEditor)

//HTML

Const BlockEmbed=Quill. Import (' blots/block/embed ')
Const Link=Quill. Import (' formats/Link ')

Export the default class Audio extends BlockEmbed {
The static create (value) {
Let the node=super. The create (value)
Node. The setAttribute (' controls', 'controls')
Node. The setAttribute (' SRC ', enclosing sanitize (value))
Return the node
}

The static sanitize (url) {
The return Link. Sanitize (url)
}

The static value (domNode) {
Return domNode. GetAttribute (' SRC ')
}
}

//HTML. Vue
The import PDF from 'PDFJS - dist'
The import Audio from '../../js/audio. Js'
Audio. BlotName='Audio'
Audio. TagName='Audio'
Quill. Register (Audio)
</script>

<script>
Let quill=this. $refs. MyQuillEditor. Quill.//get
The let length=quill. Selection. SavedRange. Index;//get focus subscript
Quill. PasteHTML (length, ` & lt; Audio SRC="https://bbs.csdn.net/topics/static/videos/notify.mp3" & gt; `)
</script>




  • Related