mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(whiteboard): keep editing state when crossing editor
This commit is contained in:
@@ -967,6 +967,29 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* used for EditorUtil only
|
||||
* @param id
|
||||
* @returns
|
||||
*/
|
||||
setEditingText = (id: string) => {
|
||||
if (this.readOnly) return;
|
||||
|
||||
this.patchState(
|
||||
{
|
||||
document: {
|
||||
pageStates: {
|
||||
[this.currentPageId]: {
|
||||
selectedIds: [id],
|
||||
editingId: id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
`set_editing_id`
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set or clear the hovered id
|
||||
* @param id [string]
|
||||
|
||||
Reference in New Issue
Block a user