ui: notes view: render node and guest notes as Markdown

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-18 19:24:39 +02:00
parent a78362cf06
commit 236b33e2b2

View File

@ -3,7 +3,6 @@ Ext.define('PVE.panel.NotesView', {
xtype: 'pveNotesView',
title: gettext("Notes"),
bodyStyle: 'white-space:pre',
bodyPadding: 10,
scrollable: true,
animCollapse: false,
@ -46,7 +45,9 @@ Ext.define('PVE.panel.NotesView', {
},
success: function(response, opts) {
var data = response.result.data.description || '';
me.update(Ext.htmlEncode(data));
let mdHTML = Proxmox.Markdown.parse(data);
me.update(mdHTML);
if (me.collapsible && me.collapseMode === 'auto') {
me.setCollapsed(data === '');