AztecEditor-iOS
AztecEditor-iOS copied to clipboard
Add a button switch to toolbar for return (enter) behavior
There was a suggestion in the mobile requests to have a button switch in the toolbar for changing the line break behavior. Currently, the visual editor adds a large paragraph break on return. The button would switch the behavior to a regular single-space line break.
Tagging as "Discussion" as it's not clear if we want this yet.
Aztec already supports this behavior through the unicode line separator character \u2028
. When a line separator is received, Aztec always adds a <br>
regardless of context.
This means any client app can force this behavior by feeding Aztec line separators.
I'll leave this issue open, though, since we may want to add this button to the Example App toolbar.
Ping @iamthomasbishop for input on this.
The keyboard offers support through SHIFT + ENTER. Do we want this feature in the toolbar?
I'm not sure how I feel about adding a UI element for this. Isn't it typical behavior in editors for enter
to perform a large/double break, and shift + enter
to perform a small/single break? This is how Calypso works and I was thinking maybe this is how Aztec should work as well. Thoughts @diegoreymendez?
The problem is if you don't have a hardware keyboard. You can have it only one way.
@iamthomasbishop - The double enter vs single enter is an HTML-mode feature. Shift + Enter is the equivalent in visual mode (even in Calypso).
Just for context, it's not possible to achieve this behavior using shift + enter with the virtual keyboard. We'll definitely need an external button like the one suggested in this issue.
Aztec already supports this behavior through the unicode line separator character
\u2028
. When a line separator is received, Aztec always adds a<br>
regardless of context.This means any client app can force this behavior by feeding Aztec line separators.
I'll leave this issue open, though, since we may want to add this button to the Example App toolbar.
I would be extremely happy about an option to use line breaks instead of paragraphs. Unfortunately using \u2028
causes problems working with lists.