mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
insert iamge
This commit is contained in:
@@ -9,6 +9,7 @@ import toaster from './components/toast';
|
||||
import ModalPortal from './components/modal-portal';
|
||||
import ShareDialog from './components/dialog/share-dialog';
|
||||
import InsertFileDialog from './components/dialog/insert-file-dialog';
|
||||
import InsertRepoImageDialog from './components/dialog/insert-repo-image-dialog';
|
||||
import { serialize, deserialize } from '@seafile/seafile-editor/dist/utils/slate2markdown';
|
||||
import LocalDraftDialog from './components/dialog/local-draft-dialog';
|
||||
import MarkdownViewerToolbar from './components/toolbar/markdown-viewer-toolbar';
|
||||
@@ -282,6 +283,7 @@ class MarkdownEditor extends React.Component {
|
||||
showMarkdownEditorDialog: false,
|
||||
showShareLinkDialog: false,
|
||||
showInsertFileDialog: false,
|
||||
showInsertRepoImageDialog: false,
|
||||
showDraftSaved: false,
|
||||
collabUsers: userInfo ?
|
||||
[{user: userInfo, is_editing: false}] : [],
|
||||
@@ -373,6 +375,7 @@ class MarkdownEditor extends React.Component {
|
||||
showMarkdownEditorDialog: false,
|
||||
showShareLinkDialog: false,
|
||||
showInsertFileDialog: false,
|
||||
showInsertRepoImageDialog: false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -461,6 +464,12 @@ class MarkdownEditor extends React.Component {
|
||||
showInsertFileDialog: true,
|
||||
});
|
||||
break;
|
||||
case 'insert_repo_image':
|
||||
this.setState({
|
||||
showMarkdownEditorDialog: true,
|
||||
showInsertRepoImageDialog: true,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -748,6 +757,15 @@ class MarkdownEditor extends React.Component {
|
||||
/>
|
||||
</ModalPortal>
|
||||
}
|
||||
{this.state.showInsertRepoImageDialog &&
|
||||
<ModalPortal>
|
||||
<InsertRepoImageDialog
|
||||
repoID={repoID}
|
||||
filePath={filePath}
|
||||
toggleCancel={this.toggleCancel}
|
||||
/>
|
||||
</ModalPortal>
|
||||
}
|
||||
{this.state.showShareLinkDialog &&
|
||||
<ModalPortal>
|
||||
<ShareDialog
|
||||
|
Reference in New Issue
Block a user