GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.96k stars 395 forks source link

Can't insert line break with shift+enter in table #389

Open lubomirblazekcz opened 7 years ago

lubomirblazekcz commented 7 years ago

Line break can be inserted with shift+enter in paragraphs, but the same behaviour is not working in tables (I can insert the line break only with the icon in toolbar).

anthonyjb commented 7 years ago

Hi @evromalarkey - that's correct at the moment the shify + enter combo isn't implemented within list items or table divisions. I'd not thought about this before but I think this is probably something we should add as a feature so I'll flag as an enhancement.

In the meantime you can use the line-break tool within the toolbox to insert line-breaks in both list items and table divisions.

Trinitonn commented 7 years ago

Hi, this is exactly the kind of behavior I also want. As for now the return key sends you to the next cell, which is a very unexpected behavior for me. An expected behavior would be a new line just as if you were hitting the return key outside the table.

I also strongly believe following behavior would enhance the user experience:

Keep up the amazing work! @anthonyjb

Trinitonn commented 7 years ago

Just a follow up;

as I mentioned in my last comment, there is no way to exit a table if the table is the last element in an editable area. I was wrong, it's actually possible by inserting a new header/paragraph by pressing the buttons in the toolbox. Unfortunately i don't find this very intuitive, not that I am complaining :) but, it's not easy to understand for average Joe. I believe we should try to make things as self explaining as possible, and with that in mind there should be other options (like hitting the arrow down key, return key or something like that).

Also please note my previous comment: - "As we speak there is no way to insert an element before the table if the table is the first element in an editable area"

Can we find any good solution for this? (my suggestion was that hitting the SHIFT+TAB keys would insert a new paragraph before the table)