-
Notifications
You must be signed in to change notification settings - Fork 1
/
twilio-say.html
70 lines (53 loc) · 2.47 KB
/
twilio-say.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!-- Sample html file that corresponds to the 99-sample.js file -->
<!-- This creates and configures the onscreen elements of the node -->
<!-- If you use this as a template, update the copyright with your own name. -->
<!-- First, the content of the edit dialog is defined. -->
<script type="text/x-red" data-template-name="twilio-say">
<div class="form-row">
<label for="node-input-creds"> Credentials</label>
<input type="text" id="node-input-creds">
</div>
<div class="form-row">
<label for="node-input-text"><i class="fa fa-tag"></i> Text</label>
<input type="text" id="node-input-text" placeholder="Text to say">
</div>
<div class="form-row">
<label for="node-input-text"><i class="fa fa-tag"></i> Voice</label>
<input type="text" id="node-input-voice" placeholder="Voice code to use">
</div>
<div class="form-row">
<label for="node-input-text"><i class="fa fa-tag"></i> Language</label>
<input type="text" id="node-input-language" placeholder="Language to use">
</div>
<!-- By convention, most nodes have a 'name' property. The following div -->
<!-- provides the necessary field. Should always be the last option -->
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name of this Event">
</div>
</script>
<!-- Next, some simple help text is provided for the node. -->
<script type="text/x-red" data-help-name="twilio-say">
</script>
<!-- Finally, the node type is registered along with all of its properties -->
<!-- The example below shows a small subset of the properties that can be set-->
<script type="text/javascript">
RED.nodes.registerType('twilio-say',{
category: 'Twilio',
defaults: {
creds: {value:"", type:"twilio-connection"},
name: {value:""},
text: {value:""},
voice: {value:"alice"},
language: {value:"es-ES"}
},
inputs:1, // set the number of inputs - only 0 or 1
outputs:1, // set the number of outputs - 0 to n
icon: "twilio.png", // saved in icons/myicon.png
color: "#FF595F",
label: function() {
return this.name || "Say";
},
paletteLabel: "Say"
});
</script>