How to control the height of the editor dynamically to avoid clunky scrolling
try to work with vh instead of px. eg: give the editor height: '80vh', your navbar height: '20vh'. This way, the vertical scroll will never be shown or needed as long as the sum of all elements's vh ≤ 100 Hope this helps.
Read full answer below ↓Question
I've noticed if in the initialise function I set a height it will set based on a specific pixel amount e.g. height: "500px". However if you try to set with a percentage e.g. height: "90%" the editor has no height at all. Also I'm wondering what is setting the height if nothing is set because it appears to be automatically calculating a pixel amount that consumes the entire page (e.g. 100%). I actually have the editor wrapped inside a standard page template we have in the back-end of our CMS, and this page template actually has more content in side menu bars which forces the page to become a s...
Answers (4)
try to work with vh instead of px.
eg: give the editor height: '80vh', your navbar height: '20vh'. This way, the vertical scroll will never be shown or needed as long as the sum of all elements's vh ≤ 100
Hope this helps.
try to work with
vhinstead ofpx.eg: give the editor
height: '80vh', your navbarheight: '20vh'. This way, the vertical scroll will never be shown or needed as long as the sum of all elements'svh≤ 100Hope this helps.
thanks this is useful!
This is more a layout issue and not related to the GrapesJS editor itself.
Thanks for reporting this, @samichamoun. Great suggestion about How to control the height of the editor dynamically to avoid clunky scrolling! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: L...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3558
FEAT: Support Content-Security-Policy
To reduce the possible attack surface if the editor is used in "hostile" environments (e.g. in SaaS platforms) support for CSP is required....
Issue #3269
Translating html string
Great library! It meets all the requirements but one: website text translation. I've searched high and low through the issue queue and docs...
Issue #4250
init() method typings error
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v 100.0.4896.75 Reproducible demo l...
Issue #3194
How do I repurpose the Spectrum Color Picker?
I would like to repurpose the color picker used in GrapesJS. I have to use a color picker for some project level settings. These settings a...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda (2026): Honest Comparison, Pricing & Which to Pick
GrapesJS vs Webflow vs Tilda compared head-to-head: real 2026 pricing, SEO features, code export, and which one actually fits your project
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.