pve-manager/www/manager6/window/NotesEdit.js
Thomas Lamprecht dab34bb5f5 ui: notes: add empty text with a hint that markdown is supported
We can do so unconditionally as this is a PVE specific component and
only used for guests and nodes, both using the markdown Parser.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 08:29:29 +02:00

38 lines
679 B
JavaScript

Ext.define('PVE.window.NotesEdit', {
extend: 'Proxmox.window.Edit',
title: gettext('Notes'),
width: 800,
height: '600px',
resizable: true,
layout: 'fit',
autoLoad: true,
defaultButton: undefined,
setMaxLength: function(maxLength) {
let me = this;
let area = me.down('textarea[name="description"]');
area.maxLength = maxLength;
area.validate();
return me;
},
items: {
xtype: 'textarea',
name: 'description',
height: '100%',
value: '',
hideLabel: true,
emptyText: gettext('You can use Markdown for rich text formatting.'),
fieldStyle: {
'white-space': 'pre-wrap',
'font-family': 'monospace',
},
},
});