UNPKG

node-red-contrib-motechat

Version:

ultranet topic and payload communication

51 lines (47 loc) 1.34 kB
<script type="text/x-red" data-template-name="js"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="js"> </div> <div class="form-row"> <label for="node-input-path"><i class="fa fa-tag"></i> Path</label> <input type="text" id="node-input-path" placeholder=""/> </div> </script> <script type="text/x-red" data-help-name="js"> <p>Motechat js node.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt class="optional">name <span class="property-type">string</span> </dt> <dd>The name of the node.</dd> <dt class="optional">path <span class="property-type">string</span> </dt> <dd>The path of the js file.</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt class="optional">any <span class="property-type">any</span> </dt> <dd>The return value of js </dl> </script> <script type="text/javascript"> RED.nodes.registerType('js', { category: 'motechat', color: '#E5BC9F', defaults: { name: { value: '' }, path: { value: 'flow/js/library.js' } }, inputs: 1, outputs: 1, icon: "js.png", label: function () { return this.name || "js" } }); </script>