2014-06-24 14:22:16 +02:00
|
|
|
|
2020-01-15 03:40:48 +01:00
|
|
|
<script type="text/html" data-template-name="html">
|
2018-01-30 17:09:01 +01:00
|
|
|
<div class="form-row">
|
2020-01-21 12:13:34 +01:00
|
|
|
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label>
|
2018-05-01 13:42:27 +02:00
|
|
|
<input type="text" id="node-input-property" style="width:70%">
|
2018-01-30 17:09:01 +01:00
|
|
|
</div>
|
2014-06-24 14:22:16 +02:00
|
|
|
<div class="form-row">
|
2015-05-10 22:47:22 +02:00
|
|
|
<label for="node-input-tag"><i class="fa fa-filter"></i> <span data-i18n="html.label.select"></span></label>
|
2016-06-27 00:48:59 +02:00
|
|
|
<input type="text" id="node-input-tag" placeholder="h1">
|
2014-06-24 14:22:16 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2015-05-10 22:47:22 +02:00
|
|
|
<label for="node-input-ret"><i class="fa fa-sign-out"></i> <span data-i18n="html.label.output"></span></label>
|
2016-06-27 00:48:59 +02:00
|
|
|
<select id="node-input-ret" style="width:70%">
|
2015-05-28 00:07:31 +02:00
|
|
|
<option value="html" data-i18n="html.output.html"></option>
|
2015-12-19 13:44:11 +01:00
|
|
|
<option value="text" data-i18n="html.output.text"></option>
|
|
|
|
<option value="attr" data-i18n="html.output.attr"></option>
|
2014-06-24 14:22:16 +02:00
|
|
|
<!-- <option value="val">return the value from a form element</option> -->
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-as"> </label>
|
2016-06-27 00:48:59 +02:00
|
|
|
<select id="node-input-as" style="width:70%">
|
2015-05-28 00:07:31 +02:00
|
|
|
<option value="single" data-i18n="html.format.single"></option>
|
|
|
|
<option value="multi" data-i18n="html.format.multi"></option>
|
2014-06-24 14:22:16 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
2018-05-01 13:42:27 +02:00
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-outproperty"> </label>
|
|
|
|
<span data-i18n="html.label.in" style="padding-left:8px; padding-right:2px; vertical-align:-1px;"></span> <input type="text" id="node-input-outproperty" style="width:64%">
|
|
|
|
</div>
|
2014-06-24 14:22:16 +02:00
|
|
|
<br/>
|
|
|
|
<div class="form-row">
|
2015-05-10 22:47:22 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
2016-06-27 00:48:59 +02:00
|
|
|
<input type="text" id="node-input-name" style="width:70%" data-i18n="[placeholder]common.label.name">
|
2014-06-24 14:22:16 +02:00
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('html',{
|
2019-06-19 15:31:03 +02:00
|
|
|
category: 'parser',
|
2014-06-24 14:22:16 +02:00
|
|
|
color:"#DEBD5C",
|
|
|
|
defaults: {
|
2015-02-10 17:55:50 +01:00
|
|
|
name: {value:""},
|
2018-02-03 00:40:01 +01:00
|
|
|
property: {value:"payload"},
|
2018-05-01 13:42:27 +02:00
|
|
|
outproperty: {value:"payload"},
|
2014-06-24 14:22:16 +02:00
|
|
|
tag: {value:""},
|
|
|
|
ret: {value:"html"},
|
2015-02-10 17:55:50 +01:00
|
|
|
as: {value:"single"}
|
2014-06-24 14:22:16 +02:00
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:1,
|
2019-06-21 13:36:20 +02:00
|
|
|
icon: "parser-html.svg",
|
2014-06-24 14:22:16 +02:00
|
|
|
label: function() {
|
|
|
|
return this.name||this.tag||"html";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
2018-02-03 00:40:01 +01:00
|
|
|
},
|
|
|
|
oneditprepare: function() {
|
|
|
|
$("#node-input-property").typedInput({default:'msg',types:['msg']});
|
2018-05-01 13:42:27 +02:00
|
|
|
$("#node-input-outproperty").typedInput({default:'msg',types:['msg']});
|
2014-06-24 14:22:16 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|