Skip to content

Fixed height of editor #3322

Answered by ruiyuwg
mohak48 asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to find a "not perfect" workaround, wrapping the editor with a div with h-screen will fix the height of the editor to the size of the viewport:

<div className="h-screen">
  <PlateEditor />
</div>

Also, if you want to fix the editor to a specific height, tailwind h-<number> works, but some other relative height classes like h-full and h-1/2 won't work, because the editor will still grow in height as you write more text.

The problem is, if you have custom elements like headers and footers, and you want to fix the height of the editor to take up the available space within the container, without growing with the content length but adapt responsively to screen sizes, this can be very…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by zbeyens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants