Set fixed 512px height for the whole editor (#18284)

This commit is contained in:
Rémi de Juvigny 2023-10-04 14:16:45 +02:00 committed by GitHub
parent 502bd29738
commit ab5a18e8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -13,6 +13,7 @@ const getEditorStyle = (theme) => ({
display: 'flex',
flexDirection: 'column',
gap: theme.spaces[2],
height: '100%',
});
const baseRenderLeaf = (props, modifiers) => {

View File

@ -28,7 +28,6 @@ const EditorDivider = styled(Divider)`
const Wrapper = styled(Box)`
width: 100%;
max-height: 512px;
overflow: auto;
padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
font-size: ${({ theme }) => theme.fontSizes[2]};
@ -109,10 +108,10 @@ const BlocksEditor = React.forwardRef(
initialValue={value || [{ type: 'paragraph', children: [{ type: 'text', text: '' }] }]}
onChange={handleSlateChange}
>
<InputWrapper direction="column" alignItems="flex-start">
<InputWrapper direction="column" alignItems="flex-start" height="512px">
<BlocksToolbar disabled={disabled} />
<EditorDivider width="100%" />
<Wrapper>
<Wrapper grow={1}>
<BlocksInput disabled={disabled} />
</Wrapper>
</InputWrapper>