mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Add initial markdown node
(not quite ready for prime time)
This commit is contained in:
32
parsers/markdown/70-markdown.html
Normal file
32
parsers/markdown/70-markdown.html
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="markdown">
|
||||
<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">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="markdown">
|
||||
<p>A function that converts the <code>msg.payload</code> in markdown format to html.</p>
|
||||
<p>If the input is a string it tries to convert it to html.</p>
|
||||
<p>All other message types are ignored.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('markdown',{
|
||||
category: 'function',
|
||||
color:"#DEBD5C",
|
||||
defaults: {
|
||||
name: {value:""}
|
||||
},
|
||||
inputs:1,
|
||||
outputs:1,
|
||||
icon: "parser-markdown.png",
|
||||
label: function() {
|
||||
return this.name||"markdown";
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user