editor-js / header

Header Tool for Editor.js 2.0
MIT License
101 stars 122 forks source link

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

Open mrspence opened 2 years ago

mrspence commented 2 years ago

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.

rx2347 commented 1 year ago

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