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

43 lines
1.6 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.payload</code> - Should be an [Micropub object using MF2](https://www.w3.org/TR/micropub/#json-syntax),
it will be sent without modification to the endpoint. If the payload is a string, it will be sent as a content value.</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 successful this will contain the location of this post.</p>
</script>