@seafile/seafile-editor 2.0.2-alpha0 → 2.0.2-alpha2

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.
@@ -116,14 +116,16 @@ function LongTextEditorDialog(_ref) {
116
116
  setIsFullScreen(!isFullScreen);
117
117
  setDialogStyle(containerStyle);
118
118
  }, [isFullScreen]);
119
- const onContentChanged = (0, _react.useCallback)(() => {
119
+ const onContentChanged = (0, _react.useCallback)(newValue => {
120
120
  // delay to update editor's content
121
+ // 好像图片不正确,这里获取到的不一定正确
121
122
  setTimeout(() => {
122
123
  // update parent's component cache value
123
124
  if (onEditorValueChanged && typeof onEditorValueChanged === 'function') {
124
125
  var _editorRef$current5, _editorRef$current6;
125
126
  const markdownString = (_editorRef$current5 = editorRef.current) === null || _editorRef$current5 === void 0 ? void 0 : _editorRef$current5.getValue();
126
127
  const slateNodes = (_editorRef$current6 = editorRef.current) === null || _editorRef$current6 === void 0 ? void 0 : _editorRef$current6.getSlateValue();
128
+ console.log(100, newValue);
127
129
  console.log(101, slateNodes);
128
130
  const {
129
131
  previewText,
@@ -50,7 +50,7 @@ const SimpleEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
50
50
  }, [isFetching]);
51
51
  const onContentChanged = (0, _react.useCallback)(content => {
52
52
  setRichValue(content);
53
- propsOnContentChanged && propsOnContentChanged();
53
+ propsOnContentChanged && propsOnContentChanged(content);
54
54
  }, [propsOnContentChanged]);
55
55
  const props = {
56
56
  isSupportFormula: !!mathJaxSource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "2.0.2-alpha0",
3
+ "version": "2.0.2-alpha2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {