editor-js / editor-js/paragraph

Changing defualt behavior when ENTER key is pressed

Open
#56 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
59
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hi
When using the paragraph tool. A typical user will expect that when they press the "ENTER" key it should break and create a new line. Currently on EditorJs when you press the "ENTER" key it will create a new paragraph block instead of the user expected linebreak.
This behavior can also be seen when using the code-tool plugin which allows users to use the "ENTER" key to create a new line.

According to https://editorjs.io/tools-api . The code-tool enable the breakline as shown below

```
/**
* Code Tool for the Editor.js allows to include code examples in your articles.
*/
class CodeTool {
/**
* Allow pressing Enter inside the CodeTool textarea
*
* @returns {boolean}
* @public
*/
static get enableLineBreaks() {
return true;
}

// ... tool's code
}
```
Will be possible to enable this option when using paragraph ?
or any guide on how to make this work ?

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.