Grapesjs: Scrolling issues when using the editor for partial editing

Created on 13 Apr 2017  Â·  5Comments  Â·  Source: artf/grapesjs

So far your editor works really great, thank you very much for the hard work!

Currently I am trying to use the editor to let the users edit only a part of a page, e.g. a DIV,see here https://omoco.sofaecke.org/upload/20170413141840_screenshot1.jpg

As long as the editor is not larger than the page it works fine. But the outer window has scrollbars all the positioning and offset information of the editor are wrong, see https://omoco.sofaecke.org/upload/20170413141848_screenshot2.jpg

You see that the component is not at the cursor image and also the green placement line is wrong.

Would it be possible to adapt the editor that it can handle offsets when scrolling the window? That would be really great. I already tried for myself but without luck.

bug outdated

Most helpful comment

In my case the % didn't worked that's why i used view height. May help someone.

var editor = grapesjs.init({ ... height: '100vh', })

All 5 comments

Hi @sebastianha, yeah seems like it doesn't take care of the window scroll, will try to fix it.
Anyway, for the moment, could you just try to fill all outer window height with the editor:

var editor  = grapesjs.init({
  ...
  height: '100%',
})

Hi, the problem is, that – depending on the CMS template – I also have sites with a large header image, so I definitely have to scroll to get to the editing area. It would be very cool if you could take a look at it. Thank you very much!

In my case the % didn't worked that's why i used view height. May help someone.

var editor = grapesjs.init({ ... height: '100vh', })

Hi @sebastianha the last release (v0.5.40) should fix the issue, can you confirm?

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mathiasbc picture mathiasbc  Â·  3Comments

faizansaiyed picture faizansaiyed  Â·  3Comments

adam-gpc picture adam-gpc  Â·  3Comments

FlashPapa picture FlashPapa  Â·  3Comments

andre2 picture andre2  Â·  3Comments