verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

BUG: Unable to add block after formatted text #19

Closed idawgik closed 3 years ago

idawgik commented 3 years ago

Description It seems you're unable to add a new block after typing formatted text. For example, I have text content that was formatted to be aligned center. When going to a new line after that, normally it would be a blank line where you could type or press the button to select a block. However, because it retains the formatting, it doesn't provide the option to add a block. The button doesn't exist. Even switching alignment back to left doesn't work because that is still set as formatted content. You have to actually click on the "clear-format" button to reset everything in order to add a block. This could get confusing for clients if they get stuck in this mode.

What might be a good solution would be to always have a new block button available at the end without having to manually create a new line.

Steps to reproduce

  1. Add text
  2. Select some formatting like alignment
  3. Press enter for a new line
  4. Try to add block
  5. Discover button doesn't exist

Additional info

engram-design commented 3 years ago

Fixed for the next release. To get the fix early, change your verbb/vizy requirement in composer.json to:

"require": {
  "verbb/vizy": "dev-craft-3 as 1.0.1",
  "...": "..."
}

Then run composer update.

I'll also look into how feasible it is to have the add block button always visible - it's slightly more complicated than just adding it to the end of the editor, as we need to create an empty paragraph node (so there's some space to actually add it in)

engram-design commented 3 years ago

Fixed in 1.0.2