Prevent new block when user press Enter
See original GitHub issueI have to prevent when the users press Enter, and instead of create a new paragraph, it should just return a break line <br />
. But when the users type enter only
The enter key should be equal Shift+Enter
Here’s my editor: https://staging.leorad.com.br/laudador/63
There are a bunch of pre set sentences there. If the user wants to improve that, they can continue writing, but when the user types enter, it must continue in the same block, it can not create a new block.
How can I do that?
Something around this class
By using
static get enableLineBreaks() {
return true
}
It continues in the same block, but it creates extra divs inside my current block, wrapping the sentence by divs, and i need to just add <br />
Press Enter Key
should work exactly like when press Shift+Enter Keys
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Disable New Line in Textarea when Pressed ENTER
Below code is to prevent to getting resize the "textarea", avoid scroll bar inside textarea, and also prevent to get into next line...
Read more >2.1 Why you should not press Enter at the end of every line
When typing in a Word document, don't press the Enter key at the end of every line. This page explains why.
Read more >Stop Submiting form when Press Enter - Laracasts
The problem Is when I press enter the form submit. I tried to fix it by using wire:keydown.enter.stop but the problem is not...
Read more >Disabling the Enter Key - OutSystems
Has anybody ever needed to disable the Enter key for one screen? ... I'm asking because some users are complaining that when they...
Read more >Press Shift and Enter for a new line - HTML DOM
In some cases such as an inline editable element, or a messaging application, you would like to submit the data when user presses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@neSpecc @gohabereg I feel as tough the answer here is a bit open ended,
Can you show, or at least guide in the right direction, how one might actually go about implementing that in the tool?
I think that anybody reading this can understand the logic/idea behind that as it seems to make a lot of sense, but I don’t think anyone looking at this can easily connect the dots in order to implement it into editor.js like you guys can.
PS Amazing library btw! I just found it today, and Editor.js looks really impressive so far!
Thanks! Tom
@neSpecc could you please reopen? since there is no answer Or should I create a new issue?
i really need to do this.
I can even pay if anyone give me a hand with this