@seafile/sdoc-editor 1.0.78 → 1.0.80

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.
@@ -38,6 +38,9 @@ const removeMarks = (editor, textNode) => {
38
38
  });
39
39
  };
40
40
  const clearStyles = editor => {
41
+ _slate.Transforms.unwrapNodes(editor, {
42
+ match: n => (0, _core.getNodeType)(n) === 'link'
43
+ });
41
44
  const nodeEntries = _slate.Editor.nodes(editor, {
42
45
  match: n => _slate.Text.isText(n),
43
46
  universal: true
@@ -22,6 +22,7 @@ require("prismjs/components/prism-ruby");
22
22
  require("prismjs/components/prism-swift");
23
23
  require("prismjs/components/prism-bash");
24
24
  require("prismjs/components/prism-lua");
25
+ require("prismjs/components/prism-json.js");
25
26
  // languages
26
27
 
27
28
  const newlineRe = /\r\n|\r|\n/;
@@ -56,6 +57,9 @@ const genCodeLangs = () => {
56
57
  }, {
57
58
  text: 'Java',
58
59
  value: 'java'
60
+ }, {
61
+ text: 'JSON',
62
+ value: 'json'
59
63
  }, {
60
64
  text: 'PHP',
61
65
  value: 'php'
@@ -177,6 +177,7 @@ const Image = _ref => {
177
177
  const reloadImage = (0, _react.useCallback)(() => {
178
178
  if (imageRef.current) {
179
179
  imageRef.current['src'] = (0, _helpers.getImageURL)(data.src);
180
+ setIsShowImagePlaceholder(false);
180
181
  }
181
182
  }, [data.src]);
182
183
  const onImageLoadError = (0, _react.useCallback)(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",