mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🐛 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:
@@ -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};
|
||||
`,
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user