mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
repair code bug
This commit is contained in:
@@ -470,6 +470,10 @@ class MarkdownEditor extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
getFileName = (fileName) => {
|
||||||
|
return fileName.substring(0, fileName.lastIndexOf('.'));
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, editorMode, markdownContent, fileInfo, fileTagList } = this.state;
|
const { loading, editorMode, markdownContent, fileInfo, fileTagList } = this.state;
|
||||||
|
|
||||||
@@ -504,7 +508,7 @@ class MarkdownEditor extends React.Component {
|
|||||||
ref={this.editorRef}
|
ref={this.editorRef}
|
||||||
mode={editorMode}
|
mode={editorMode}
|
||||||
isFetching={loading}
|
isFetching={loading}
|
||||||
initValue={fileName}
|
initValue={this.getFileName(fileName)}
|
||||||
value={markdownContent}
|
value={markdownContent}
|
||||||
editorApi={editorApi}
|
editorApi={editorApi}
|
||||||
onSave={this.onSaveEditorContent}
|
onSave={this.onSaveEditorContent}
|
||||||
|
Reference in New Issue
Block a user