d2f70ee2a7
Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.9 KiB
HTML
49 lines
1.9 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('collabora-convert', {
|
|
category: 'nextcloud collabora',
|
|
color: '#0082c9',
|
|
defaults: {
|
|
name: { value: '' },
|
|
config: { type: 'nc-collab-config', required: true },
|
|
operation: { value: 'convert' },
|
|
format: { value: 'pdf' }
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: 'font-awesome/fa-file-pdf-o',
|
|
label: function () {
|
|
return this.name || `convert → ${this.format}`;
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="collabora-convert">
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Namn</label>
|
|
<input type="text" id="node-input-name">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-config"><i class="fa fa-cog"></i> Config</label>
|
|
<input type="text" id="node-input-config">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-format"><i class="fa fa-file"></i> Format</label>
|
|
<select id="node-input-format">
|
|
<option value="pdf">pdf</option>
|
|
<option value="png">png</option>
|
|
<option value="docx">docx</option>
|
|
<option value="odt">odt</option>
|
|
<option value="html">html</option>
|
|
<option value="txt">txt</option>
|
|
<option value="xlsx">xlsx</option>
|
|
<option value="pptx">pptx</option>
|
|
</select>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="collabora-convert">
|
|
<p>Låg nivå: <code>/cool/convert-to</code> mot CODE.</p>
|
|
<p>Ingång: <code>msg.ncPath</code> eller <code>msg.payload</code> (Buffer). Valfritt <code>msg.format</code>, <code>msg.templateNcPath</code>, <code>msg.compareNcPath</code>.</p>
|
|
<p>Utdata: <code>msg.payload</code> (Buffer). Sparar inte till Nextcloud — använd bridge eller WebDAV PUT efteråt.</p>
|
|
</script>
|