pve-manager/www/manager6/window/NotesEdit.js
Thomas Lamprecht 959df7bf26 ui: notes: use monospace font and make white-space pre-wrap in text area
can improve editing experience quite a bit when formating tables ore
the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 18:48:12 +02:00

37 lines
608 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,
fieldStyle: {
'white-space': 'pre-wrap',
'font-family': 'monospace',
},
},
});