Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing defualt behavior when ENTER key is pressed #56

Open
osain-az opened this issue Dec 18, 2021 · 1 comment
Open

Changing defualt behavior when ENTER key is pressed #56

osain-az opened this issue Dec 18, 2021 · 1 comment

Comments

@osain-az
Copy link

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

@afatihyavasi
Copy link

Hi @osain-az. Did you find a solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants