Files
lobehub/src/routes/(main)/agent/profile/features/constants.ts
Innei 8d387a98a0 🐛 fix(editor): correct empty editor state structure and wide screen layout (#13131)
- Fix EMPTY_EDITOR_STATE with proper Lexical node structure (root id, paragraph id)
- Add flex-grow to WideScreenContainer for proper editor canvas expansion

Made-with: Cursor
2026-03-19 21:07:18 +08:00

29 lines
572 B
TypeScript

/**
* Empty editor state for initializing the editor
* This is the minimal JSON structure required by the editor
* Must have at least one paragraph with an empty text node
*/
export const EMPTY_EDITOR_STATE = {
root: {
id: 'root',
type: 'root',
format: '',
indent: 0,
version: 1,
children: [
{
id: '42',
type: 'paragraph',
format: '',
indent: 0,
version: 1,
children: [],
direction: null,
textStyle: '',
textFormat: 0,
},
],
direction: null,
},
};