Layers text does not center after creating a new line
Ok, I'll push a fix for the editing of layers name, probably it doesn't make sense having new lines enabled there (I'll make stop the editing on Enter/Esc). For the second issue, If you're using something yours to resize the canvas, probably you should call editor.refresh() to adjust the toolbar
Read full answer below βQuestion
Version: current? You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug from the demo? [ ] Yes [ x] No // to be fair never tried in the demo What is the expected behavior? when editing the layers text and adding a new line then backspacing i would expect the edited text to be recentered Describe the bug detailed the text does not recenter but is raised (please see attatched image) What is the current behavior? text is raised above the center after pressing enter to start a new line and then backspacing out of the line. however completely clearin...
Answers (3)
Ok, I'll push a fix for the editing of layers name, probably it doesn't make sense having new lines enabled there (I'll make stop the editing on Enter/Esc).
For the second issue, If you're using something yours to resize the canvas, probably you should call editor.refresh() to adjust the toolbar
yeah I didn't realize editor.refresh() was a thing until after. otherwise thanks. awesome project
Thanks for reporting this, @anatoli-dp. Great question about layers text does not center after creating a new line. The recommended approach with Canvas 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...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3166
Problem with copy and paste a node
*Version:0.16.27 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? In the right panel and canv...
Issue #3579
RTE misplaced when opened right after dropping `activeOnRender` component
Version: 0.17.4 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Steps to reproduce:Go to the demoDrop a "Text" block inside t...
Issue #3679
Device width is invalid by default
Thanks for #3673 I have a new bug feedback. Version:. 0.17.22 Are you able to reproduce the bug from the demo?[ ] Yes[ ] No What is the exp...
Issue #3295
BUG (v0.16.41): Button component with draggable property is not working properly
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? When we have a button with...
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.