Skip to content

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