@seafile/sdoc-editor 1.0.43 → 1.0.45
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.
- package/dist/context.js +1 -13
- package/dist/pages/sdoc-wiki-editor.js +0 -4
- package/package.json +1 -1
package/dist/context.js
CHANGED
|
@@ -69,20 +69,8 @@ class Context {
|
|
|
69
69
|
this.settings[key] = update[key];
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
getViewConfig() {
|
|
73
|
-
if (this.config) return this.config;
|
|
74
|
-
const {
|
|
75
|
-
rawPath,
|
|
76
|
-
docName
|
|
77
|
-
} = this.getSettings();
|
|
78
|
-
this.config = {
|
|
79
|
-
rawPath,
|
|
80
|
-
docName
|
|
81
|
-
};
|
|
82
|
-
return this.config;
|
|
83
|
-
}
|
|
84
72
|
getEditorConfig() {
|
|
85
|
-
|
|
73
|
+
// When you need to execute this function, make sure to get the latest configuration items
|
|
86
74
|
const {
|
|
87
75
|
docUuid,
|
|
88
76
|
accessToken,
|
|
@@ -17,10 +17,6 @@ const SdocWikiEditor = _ref => {
|
|
|
17
17
|
scrollRef
|
|
18
18
|
} = _ref;
|
|
19
19
|
context.initApi();
|
|
20
|
-
|
|
21
|
-
// Wiki editor need filter initialized title node
|
|
22
|
-
const [firstNode, ...restNodes] = document.children;
|
|
23
|
-
if (firstNode.type === TITLE) document.children = restNodes;
|
|
24
20
|
const validEditor = useMemo(() => {
|
|
25
21
|
const defaultEditor = createWikiEditor();
|
|
26
22
|
// getEditorConfig cashe the config, so we need to update the uuid,for wiki editor
|