@seafile/seafile-editor 2.0.5 → 2.0.7

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.
@@ -42,7 +42,7 @@ const InsertElementDialog = _ref => {
42
42
  linkTitle: selectedText
43
43
  });
44
44
  }
45
- }, [editor, setIsOpenLinkModal, setLinkInfo, setDialogType]);
45
+ }, [editor, linkInfo]);
46
46
  const onCloseModal = (0, _react.useCallback)(() => {
47
47
  setIsOpenLinkModal(false);
48
48
  setLinkInfo({
@@ -41,7 +41,7 @@ const RenderTableContainer = (_ref, editor) => {
41
41
  });
42
42
  const isReadonly = (0, _slateReact.useReadOnly)();
43
43
  (0, _react.useEffect)(() => {
44
- if (isReadonly) return null;
44
+ if (isReadonly) return;
45
45
  clearSelectedCells();
46
46
  document.addEventListener('contextmenu', handleContextMenu, true);
47
47
  document.addEventListener('mousedown', handleOutsideMouseDown);
@@ -13,6 +13,16 @@ const paragraphRule = (element, parseChild) => {
13
13
  childNodes
14
14
  } = element;
15
15
  if (nodeName === 'P' && element.parentElement.nodeName !== 'LI') {
16
+ if (childNodes.length === 0) {
17
+ return {
18
+ id: _slugid.default.nice(),
19
+ type: _constants.PARAGRAPH,
20
+ children: [{
21
+ id: _slugid.default.nice(),
22
+ text: ''
23
+ }]
24
+ };
25
+ }
16
26
  return {
17
27
  id: _slugid.default.nice(),
18
28
  type: _constants.PARAGRAPH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {