Dev #6
No files matched your search
@@ -449,7 +449,8 @@ export const WorkspaceView: React.FC<WorkspaceViewProps> = ({
|
|||||||
} catch {}
|
} catch {}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleBlockFocus = (blockId?: string) => {
|
const handleBlockFocus = (blockIdOrEvent?: string | React.FocusEvent<any>) => {
|
||||||
|
const blockId = typeof blockIdOrEvent === 'string' ? blockIdOrEvent : undefined;
|
||||||
isEditorFocusedRef.current = true;
|
isEditorFocusedRef.current = true;
|
||||||
if (idleUnlockTimerRef.current) {
|
if (idleUnlockTimerRef.current) {
|
||||||
clearTimeout(idleUnlockTimerRef.current);
|
clearTimeout(idleUnlockTimerRef.current);
|
||||||
|
|||||||
@@ -157,12 +157,15 @@ export type BlockType = 'h1' | 'h2' | 'h3' | 'paragraph' | 'todo' | 'bullet' | '
|
|||||||
|
|
||||||
export interface DocumentBlock {
|
export interface DocumentBlock {
|
||||||
id: string;
|
id: string;
|
||||||
|
docId?: string;
|
||||||
type: BlockType;
|
type: BlockType;
|
||||||
content: string;
|
content: string;
|
||||||
checked?: boolean;
|
checked?: boolean;
|
||||||
lang?: string;
|
lang?: string;
|
||||||
level?: number;
|
level?: number;
|
||||||
collapsed?: boolean;
|
collapsed?: boolean;
|
||||||
|
sortOrder?: number;
|
||||||
|
updatedAt?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DocBlocksPatchRequest {
|
export interface DocBlocksPatchRequest {
|
||||||
|
|||||||
Reference in new issue
Block a user