Border of images and some elements in the wrong position
@saharelhage please avoid converting discussions to issues. The GitHub Issues should only be created from here by properly following the template.
Read full answer below ↓Question
On smaller laptop screens (macbooks for example), the border of images and some elements are in the wrong position (when i click to move or resize an image) I am not having this issue when the editor gets rendered on bigger screens.
I am not sure if there is a config step that i'm missing.
Can anyone please assist? Is this a common issue?
For example: <img width="217" alt="Screenshot 2023-08-08 at 3 20 19 PM" src="https://github.com/GrapesJS/grapesjs/assets/121887023/9b83c4a2-c944-4faf-94e0-3d6bca9c80d1"> <img width="245" alt="Screenshot 2023-08-08 at 3 20 25 PM" src="https://github.com/GrapesJS/grapesjs/assets/121887023/8526ca87-e312-4fdb-ae1e-92799398805d">
Originally posted by @saharelhage in https://github.com/GrapesJS/grapesjs/discussions/5285
Answers (2)
@saharelhage please avoid converting discussions to issues. The GitHub Issues should only be created from here by properly following the template.
Thanks for reporting this, @saharhagekr.
Great question about Border of images and some elements in the wrong position. The recommended approach with GrapesJS is to use the event-driven API.
Start here:
- Check the GrapesJS documentation for your specific module
- Look for the
on()event listener method - Most operations can be achieved by listening to editor and component events
Common patterns:
// Listen for changes
editor.on('change', () => console.log('something changed'));
// Component lifecycle
editor.on('component:mount', (c) => console.log('component ready', c));
editor.on('component:update', (c) => console.log('component updated', c));
If you're still stuck:
- Share a minimal CodeSandbox reproduction
- Include what you've already tried
- Mention your GrapesJS version
- The community is here to help!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3369
FEAT: is it possible add a relative offset for the colorpicker
for example: I add a left bar and top bar outside the editor. I know the colorpicker's position is relative the body, so is it possible add...
Issue #3490
Large images make area of content editor unreachable
Hi, If you for example add a 3 column block to a page, and try dragging a very wide image into each column, the content stretches and the o...
Issue #3713
Stored components with script can not be rendered properly
I am facing some problem when try to save some components which includes some scripts and reload the page the components are not rendered p...
Issue #3574
adding traits are not picked up by trait manager.
Following example from docs . Is there further configurtion to make new traitsa show for elements? The example using the input does not run...
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
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.