mirror of https://github.com/fantasticit/think.git
Merge pull request #150 from fantasticit/fix/delete
This commit is contained in:
commit
4ae76f3d03
|
@ -36,7 +36,6 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
|
|||
|
||||
setEditor(instance);
|
||||
|
||||
if (!options.editable) {
|
||||
instance.on('transaction', () => {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
|
@ -44,7 +43,6 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
|
|||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
instance.destroy();
|
||||
|
|
|
@ -267,13 +267,14 @@ export class CollaborationService {
|
|||
|
||||
if (docType === 'document') {
|
||||
const data = await this.documentService.findById(targetId);
|
||||
|
||||
if (data && !data.title) {
|
||||
await this.documentService.updateDocument({ id: userId } as IUser, targetId, {
|
||||
title: '未命名文档',
|
||||
});
|
||||
}
|
||||
|
||||
if (editable) {
|
||||
if (data && editable) {
|
||||
const content = data.content;
|
||||
const json = JSON.parse(content).default;
|
||||
const mentionUsers = findMentions(json);
|
||||
|
|
Loading…
Reference in New Issue