@seafile/sdoc-editor 2.0.80-test-0.0.2 → 2.0.80-test-0.0.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.
@@ -42,7 +42,8 @@ const CommentItemCollapseWrapper = _ref => {
42
42
  (0, _react.useEffect)(() => {
43
43
  const initCommentContent = async () => {
44
44
  const htmlString = await _mdToHtml.default.process(topLevelComment.comment);
45
- setCommentContent(String(htmlString));
45
+ const htmlStringRes = String(htmlString);
46
+ setCommentContent((0, _helper.parseHtmlImages)(htmlStringRes));
46
47
  };
47
48
  initCommentContent();
48
49
  }, [topLevelComment.comment]);
@@ -48,18 +48,6 @@ const CommentItemContent = _ref => {
48
48
  console.log(3, mdString, htmlString);
49
49
  console.log(4, String(htmlString));
50
50
  const htmlStringRes = String(htmlString);
51
- // let newHtmlString = htmlStringRes;
52
- // // return urlJoin(serviceUrl, assetsUrl, url);
53
-
54
- // if (htmlStringRes.includes('<img')) {
55
- // const serviceUrl = context.getSetting('serviceUrl');
56
- // const assetsUrl = context.getSetting('assetsUrl');
57
- // const baseUrl = urlJoin(serviceUrl, assetsUrl);
58
- // newHtmlString = htmlStringRes.replace(
59
- // /<img\s+([^>]*?)src="\/(.*?)"/g,
60
- // `<img $1src="${baseUrl}/$2"`
61
- // );
62
- // }
63
51
  setEditorContent((0, _helper.parseHtmlImages)(htmlStringRes));
64
52
  };
65
53
  const onDeleteToggle = (0, _react.useCallback)(event => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.80-test-0.0.2",
3
+ "version": "2.0.80-test-0.0.3",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",