Skip to content

Commit

Permalink
fix: render line break in text/plain format for hard breaks, fix #1842
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Sep 6, 2021
1 parent 73a278a commit 787d784
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/extension-hard-break/src/hard-break.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const HardBreak = Node.create<HardBreakOptions>({
return ['br', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]
},

renderText() {
return '\n'
},

addCommands() {
return {
setHardBreak: () => ({ commands }) => {
Expand Down

0 comments on commit 787d784

Please sign in to comment.