Skip to content

Commit

Permalink
fix: #847 #851
Browse files Browse the repository at this point in the history
bug when paste the video tag,
edit html attributes in code view mode
  • Loading branch information
JiHong88 committed Nov 24, 2021
1 parent 2778205 commit 7153d2e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sample/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ <h2 class="sub-title">Applied options</h2>
videoResizing: document.getElementById('videoResizing').checked ? undefined : false,
videoHeightShow: document.getElementById('videoHeightShow').checked ? undefined : false,
videoAlignShow: document.getElementById('videoAlignShow').checked ? undefined : false,
videoFileInput: document.getElementById('videoFileInput').checked ? undefined : false,
videoFileInput: document.getElementById('videoFileInput').checked ? true : false,
videoUrlInput: document.getElementById('videoUrlInput').checked ? undefined : false,
videoRatioShow: document.getElementById('videoRatioShow').checked ? undefined : false,
videoWidth: document.getElementById('videoWidth').checked ? document.getElementById('videoWidth_value').value : undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dialog/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export default {
url = 'https://player.vimeo.com/video/' + url.slice(url.lastIndexOf('/') + 1);
}

this.plugins.video.create_video.call(this, this.plugins.video.createIframeTag.call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal);
this.plugins.video.create_video.call(this, this.plugins.video[(!/youtu\.?be/.test(url) && !/vimeo\.com/.test(url) ? "createVideoTag" : "createIframeTag")].call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal);
} catch (error) {
throw Error('[SUNEDITOR.video.upload.fail] cause : "' + error.message + '"');
} finally {
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/modules/fileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
_checkMediaComponent: function (tag) {
if (/IMG/i.test(tag)) {
return !/FIGURE/i.test(tag.parentElement.nodeName) || !/FIGURE/i.test(tag.parentElement.parentElement.nodeName);
} else if (/VIDEO/i.test(tag)) {
return !/FIGURE/i.test(tag.parentElement.nodeName);
}
return true;
},
Expand Down

0 comments on commit 7153d2e

Please sign in to comment.