@seafile/sdoc-editor 1.0.206-test0.3.1 → 1.0.206-test0.3.3

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.
@@ -89,14 +89,17 @@ const insertVideo = function (editor, videoFiles, srcList, selection) {
89
89
  let videoNodes;
90
90
  // Parse youtube and tencent video url when embed thirdPlatform link
91
91
  if (Array.isArray(videoFiles) && (_videoFiles$ = videoFiles[0]) !== null && _videoFiles$ !== void 0 && _videoFiles$.isEmbeddableLink) {
92
- const [parsedSrc] = parseVideoLink(srcList[0]);
92
+ const parsedSrc = parseVideoLink(srcList[0]);
93
93
  if (!parsedSrc) return;
94
- videoNodes = generateVideoNode(parsedSrc, videoFiles);
94
+ videoNodes = [parsedSrc].map(src => {
95
+ return generateVideoNode(src, videoFiles);
96
+ });
95
97
  } else {
96
98
  videoNodes = srcList.map(src => {
97
99
  return generateVideoNode(src, videoFiles);
98
100
  });
99
101
  }
102
+ console.log(videoNodes);
100
103
  const validSelection = selection || editor.selection;
101
104
  let path = _slate.Editor.path(editor, validSelection);
102
105
  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.3.1",
3
+ "version": "1.0.206-test0.3.3",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",