Description editor: preserve newlines on export, toggle Quote, highlight active toolbar buttons
- Enter now starts a new <p> (defaultParagraphSeparator) so line breaks in the description box show up as line breaks in HTML/Markdown/Confluence exports; htmlToMarkdown also handles <div>-separated paragraphs. - Clicking Quote while already in a blockquote toggles back to a paragraph. - Toolbar buttons (Bold, Italic, Bullet, Number, Quote) turn blue to reflect the formatting state at the current cursor/selection.
This commit is contained in:
@@ -42,6 +42,8 @@ function htmlToMarkdown(html) {
|
||||
.replace(/<hr\s*\/?>/gi, '\n---\n')
|
||||
.replace(/<p>/gi, '\n')
|
||||
.replace(/<\/p>/gi, '\n')
|
||||
.replace(/<div>/gi, '\n')
|
||||
.replace(/<\/div>/gi, '\n')
|
||||
.replace(/<[^>]+>/g, '');
|
||||
|
||||
return decodeEntities(out).replace(/[ \t]+\n/g, '\n').replace(/\n{3,}/g, '\n\n').trim();
|
||||
|
||||
Reference in New Issue
Block a user