Improve switching of wysiwyg/plain composer

This commit is contained in:
djmaze 2021-02-02 12:23:32 +01:00
parent cd2b3ace89
commit 90ee39b114
7 changed files with 103 additions and 135 deletions

View file

@ -85,7 +85,7 @@ export function htmlToPlain(html) {
args && 1 < args.length
? args[1]
.toString()
.replace(/[\n]/gm, '<br />')
.replace(/[\n]/gm, '<br/>')
.replace(/[\r]/gm, '')
: '',
fixAttibuteValue = (...args) => (args && 1 < args.length ? '' + args[1] + encodeHtml(args[2]) : ''),
@ -204,7 +204,7 @@ export function plainToHtml(plain) {
.replace(/</g, '&lt;')
.replace(/~~~blockquote~~~[\s]*/g, '<blockquote>')
.replace(/[\s]*~~~\/blockquote~~~/g, '</blockquote>')
.replace(/\n/g, '<br />');
.replace(/\n/g, '<br/>');
}
rl.Utils = {