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

Header not allowing <br> when shift+enter pressed #73

Open
mrspence opened this issue Dec 17, 2021 · 1 comment
Open

Header not allowing <br> when shift+enter pressed #73

mrspence opened this issue Dec 17, 2021 · 1 comment

Comments

@mrspence
Copy link

This plugin does not allow the user to press shift + Enter to create an inline break. This is supported in the paragraph plugin but not in this one yet! :-)

I believe the issue resides within the sanitize method. The Paragraph plugin has a "br" sanatize rule whereas this header plugin doesn't.

Proposed fix: extend plugin config to allow enabling of br tags in Header.

mrspence added a commit to mrspence/header that referenced this issue Dec 17, 2021
Allow a Header Tool's text to include break line `<br>` tags when a user presses Shift + Enter.

By default, this is disabled, the developer can choose to enable through the tool's config:

```
config: {
    allowLineBreaks: true,
}
```

Fixes editor-js#73
@rx2347
Copy link

rx2347 commented Apr 1, 2023

This would be really useful, especially if you have margins for h tags to get the spacing to the next content block.

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