mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 04:45:54 +00:00
Set fixed 512px height for the whole editor (#18284)
This commit is contained in:
parent
502bd29738
commit
ab5a18e8aa
@ -13,6 +13,7 @@ const getEditorStyle = (theme) => ({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: theme.spaces[2],
|
gap: theme.spaces[2],
|
||||||
|
height: '100%',
|
||||||
});
|
});
|
||||||
|
|
||||||
const baseRenderLeaf = (props, modifiers) => {
|
const baseRenderLeaf = (props, modifiers) => {
|
||||||
|
@ -28,7 +28,6 @@ const EditorDivider = styled(Divider)`
|
|||||||
|
|
||||||
const Wrapper = styled(Box)`
|
const Wrapper = styled(Box)`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 512px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
|
padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
|
||||||
font-size: ${({ theme }) => theme.fontSizes[2]};
|
font-size: ${({ theme }) => theme.fontSizes[2]};
|
||||||
@ -109,10 +108,10 @@ const BlocksEditor = React.forwardRef(
|
|||||||
initialValue={value || [{ type: 'paragraph', children: [{ type: 'text', text: '' }] }]}
|
initialValue={value || [{ type: 'paragraph', children: [{ type: 'text', text: '' }] }]}
|
||||||
onChange={handleSlateChange}
|
onChange={handleSlateChange}
|
||||||
>
|
>
|
||||||
<InputWrapper direction="column" alignItems="flex-start">
|
<InputWrapper direction="column" alignItems="flex-start" height="512px">
|
||||||
<BlocksToolbar disabled={disabled} />
|
<BlocksToolbar disabled={disabled} />
|
||||||
<EditorDivider width="100%" />
|
<EditorDivider width="100%" />
|
||||||
<Wrapper>
|
<Wrapper grow={1}>
|
||||||
<BlocksInput disabled={disabled} />
|
<BlocksInput disabled={disabled} />
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</InputWrapper>
|
</InputWrapper>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user