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

Fix Header Tool not supporting line breaks #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrspence
Copy link

@mrspence mrspence commented Dec 17, 2021

What's the issue?

Currently the Header Tool does not support line breaks like other Tools do. Normally a user can press Shift + Enter which adds a line break. However at the moment this tool strips line breaks out.

This pull request fixes:

Solution

This pull request adds a config parameter allowLineBreaks: {Boolean} that allows the developer to enable line breaks should they need.

config: {
    allowLineBreaks: true, // default: false
}

By default, line breaks are not enabled, as per the current status quo.

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
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

Successfully merging this pull request may close these issues.

1 participant