After uploading the video, I want to add the law to div? Use append import? But do not listen to < video >

$("-sharpuploadVideo").change(function(event) {
    var video = this.files[0];
    var videoUrl = window.URL.createObjectURL(video);
    $(".ql-editor").append("<video><source src=""+videoUrl+""></video>");
  });
<input type="file" id="uploadVideo" accept="video/*"></div>
<div class="ql-editor" contenteditable="true"></div>

Update: I have been able to obtain the expected network address
, but I found that entering the < video > XXX network address < / video > does not work. Only

Strong text! can
comment on how to let the entire < video > header enter?
even if I enter ql-editor directly, I can show the movie directly? (directly enable HTML)?


change it this way

$('-sharpuploadVideo').change(function(event) {
    var $editor = $('.ql-editor');
    $editor.append('<video controls="controls">XXX</video>');
    var $video = $('.ql-editor video');
    $video[0].src = URL.createObjectURL(this.files[0]);
    $video[0].load();
  });
Menu