input -> textarea

master
Pietro Brenna 2020-02-21 13:54:36 +01:00
parent db86642364
commit 5489cb49c3
1 changed files with 21 additions and 4 deletions

View File

@ -264,9 +264,9 @@
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> Property:</label>
<input type="text" id="node-input-property" style="width: 70%"/>
</div>
<div class="form-row">
<label for="node-input-help_text"><i class="fa fa-ellipsis-h"></i> Help text:</label>
<input type="text" id="node-input-help_text" style="width: 70%"/>
<div class="form-row node-text-editor-row">
<input type="hidden" id="node-input-help_text" autofocus="autofocus">
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-help_text-editor"></div>
</div>
</script>
@ -285,6 +285,23 @@
outputs: 2,
label: function() {
return this.name || "parser entry point";
}
},
oneditprepare: function() {
var that = this;
this.editor = RED.editor.createEditor({
id: 'node-input-help_text-editor',
value: $("#node-input-help_text").val()
});
this.editor.focus();
},
oneditsave: function() {
$("#node-input-help_text").val(this.editor.getValue());
this.editor.destroy();
delete this.editor;
},
oneditcancel: function() {
this.editor.destroy();
delete this.editor;
},
});
</script>