@seafile/sdoc-editor 1.0.36-alpha.1 → 1.0.36-alpha.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.
|
@@ -208,12 +208,13 @@ const FileLinkInsertDialog = _ref => {
|
|
|
208
208
|
}, [editor, element, eventBus]);
|
|
209
209
|
const onCreateFile = useCallback(e => {
|
|
210
210
|
e.stopPropagation();
|
|
211
|
+
removeTempInput(editor, element);
|
|
211
212
|
const eventBus = EventBus.getInstance();
|
|
212
213
|
const dispatchEventKey = editor.editorType === WIKI_EDITOR ? EXTERNAL_EVENT.CREATE_WIKI_PAGE : EXTERNAL_EVENT.CREATE_SDOC_FILE;
|
|
213
214
|
eventBus.dispatch(dispatchEventKey, {
|
|
214
215
|
newFileName: newFileName.trim()
|
|
215
216
|
});
|
|
216
|
-
}, [editor
|
|
217
|
+
}, [editor, element, newFileName]);
|
|
217
218
|
const createFileTipDefault = useMemo(() => {
|
|
218
219
|
return editor.editorType === WIKI_EDITOR ? 'New_page' : 'Create_a_new_sdoc_file';
|
|
219
220
|
}, [editor.editorType]);
|