use br for email content

pull/601/head
Pete Matsyburka 4 weeks ago
parent 845782a69c
commit e6e640328b

@ -208,7 +208,13 @@ export default actionable(targetable(class extends HTMLElement {
Text, Text,
Bold, Bold,
Italic, Italic,
HardBreak, HardBreak.extend({
addKeyboardShortcuts () {
return {
Enter: () => this.editor.commands.setHardBreak()
}
}
}),
UndoRedo, UndoRedo,
Link.extend({ Link.extend({
inclusive: true, inclusive: true,
@ -230,7 +236,7 @@ export default actionable(targetable(class extends HTMLElement {
Underline, Underline,
VariableHighlight VariableHighlight
], ],
content: this.textarea.value || '', content: (this.textarea.value || '').trim().replace(/ *\n/g, '<br>'),
contentType: 'markdown', contentType: 'markdown',
editorProps: { editorProps: {
attributes: { attributes: {

Loading…
Cancel
Save