🐛 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
This commit is contained in:
Innei
2026-03-19 21:07:18 +08:00
committed by GitHub
parent 3931aa9f76
commit 8d387a98a0
2 changed files with 12 additions and 19 deletions

View File

@@ -13,6 +13,7 @@ import { systemStatusSelectors } from '@/store/global/selectors';
const styles = createStaticStyles(({ css }) => ({
container: css`
flex-grow: 1;
align-self: center;
transition: width 0.25s ${cssVar.motionEaseInOut};
`,

View File

@@ -5,32 +5,24 @@
*/
export const EMPTY_EDITOR_STATE = {
root: {
id: 'root',
type: 'root',
format: '',
indent: 0,
version: 1,
children: [
{
children: [
{
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: '',
type: 'text',
version: 1,
},
],
direction: null,
id: '42',
type: 'paragraph',
format: '',
indent: 0,
textFormat: 0,
textStyle: '',
type: 'paragraph',
version: 1,
children: [],
direction: null,
textStyle: '',
textFormat: 0,
},
],
direction: null,
format: '',
indent: 0,
type: 'root',
version: 1,
},
};