node-red-contrib-micropub/micropub-create.html

48 lines
1.9 KiB
HTML

<script type="text/javascript">
(function () {
RED.nodes.registerType('micropub-create', {
category: 'output',
color: '#a6bbcf',
defaults: {
name: {value: ""},
endpoint: {value: "", type: "indieauth"}
},
inputs: 1,
outputs: 1,
icon: "bridge.png",
label: function () {
return this.name || "micropub";
}
})
})();
</script>
<script type="text/x-red" data-template-name="micropub-create">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-endpoint"><i class="icon-tag"></i> Endpoint</label>
<input type="text" id="node-input-endpoint" placeholder="Endpoint">
</div>
</script>
<script type="text/x-red" data-help-name="micropub-create">
<p>Posts to Micropub endpoints</p>
<p>Connect to your Micropub powered blog and post messages.</p>
<p>Input Parameters:</p>
<p><code>msg.type</code> - Default: 'json'
<p><code>msg.payload</code> - Should be an Micropub object using MF2.</p>
<p><code>msg.payload.type</code> - Should be an array with the type.</p>
<p><code>msg.payload.properties</code> - Should be on object with MF2 properties.</p>
<p><code>msg.payload.properties.name</code> - Should be an array with a string.</p>
<p><code>msg.payload.properties.content.html</code> - Should be a string.</p>
<p><code>msg.payload.properties.content.value</code> - Should be a string.</p>
<p>Output Values:</p>
<p>This message will be passed on unchanged, but the <code>location</code> of the post will be added.</p>
<p><code>msg.location</code> - When succesful this will contain the location of this post.</p>
</script>