@seafile/sdoc-editor 1.0.206-test0.4.0 → 1.0.206-test0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,12 +102,15 @@ const insertVideo = function (editor, videoFiles, srcList, selection) {
102
102
  isEmbeddableLink: videoFiles[0].isEmbeddableLink || false
103
103
  };
104
104
  console.log(videoInfo);
105
+ let videoNodes;
105
106
  // Return when embedding invalid youtube, tencent or bilibili video url
106
107
  if (videoInfo.isEmbeddableLink) {
107
108
  const parsedSrc = parseVideoLink(srcList[0]);
108
109
  if (!parsedSrc) return;
110
+ videoNodes = generateVideoNode(parsedSrc, videoInfo);
111
+ } else {
112
+ videoNodes = generateVideoNode(srcList[0], videoInfo);
109
113
  }
110
- const videoNodes = generateVideoNode(srcList[0], videoInfo);
111
114
  const validSelection = selection || editor.selection;
112
115
  let path = _slate.Editor.path(editor, validSelection);
113
116
  if (position === _constants.INSERT_POSITION.AFTER) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.206-test0.4.0",
3
+ "version": "1.0.206-test0.4.1",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",