mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
- 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
29 lines
572 B
TypeScript
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,
|
|
},
|
|
};
|