@seafile/seafile-editor 0.3.85 → 0.3.86

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.
File without changes
@@ -233,10 +233,18 @@ var Plugin = function Plugin(_editor) {
233
233
 
234
234
  if (nodeList.length === 1) {
235
235
  event.preventDefault();
236
- var node = nodeList[0][0];
236
+
237
+ var _nodeList$ = _slicedToArray(nodeList[0], 2),
238
+ node = _nodeList$[0],
239
+ path = _nodeList$[1];
240
+
241
+ path = path.slice(1);
237
242
 
238
243
  if (node && node.type === 'paragraph') {
239
- setEventTransfer(event, 'fragment', [node]);
244
+ // get selected paragraph node in selection and write to clipboard
245
+ var fragment = Node.fragment(editor, editor.selection);
246
+ var selectedNode = Node.get(fragment[0], Array(path.length).fill(0));
247
+ setEventTransfer(event, 'fragment', [selectedNode]);
240
248
  } else {
241
249
  setEventTransfer(event, 'text', SfEditor.text(editor, editor.selection));
242
250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "0.3.85",
3
+ "version": "0.3.86",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^0.0.9",