GrapesJS / preset-newsletter

GrapesJS preset configuration for the newsletter editor.
https://grapesjs.com/demo-newsletter-editor.html
BSD 3-Clause "New" or "Revised" License
189 stars 143 forks source link

Clicking enter does not expand the text window #114

Closed MortenSpjotvoll closed 1 year ago

MortenSpjotvoll commented 2 years ago

Steps to reproduce:

  1. Go to https://grapesjs.com/demo-newsletter-editor.html
  2. Insert a Text component image
  3. Enter the text component and click enter image
  4. Enter any other character, including backspace, and it will update correctly image

Considering enter has some special functionality (insert p or br tags) I guess it uses a preventDefault that stops the height style from updating. As can be seen in the screenshots the height of the gjs-tools stays the same no matter how many times you press enter, but changes correctly once you use another key. If that's the case then this could be a really quick fix for you who are familiar with the code @artf

There's also an issue the first time you click into a text element, the toolbar spawns directly in front of the text instead of above/below.

artf commented 1 year ago

This should be fixed with the latest release of the ckeditor plugin