Files
nextcloud-collabora-nodered/nodes/collabora-bridge.html
T
root d3d3f33ec6 Translate user-facing docs and node help to English
README, NODES.md, install scripts, palette help text, and example flows — node .js logic unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 17:36:38 +02:00

68 lines
3.3 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('collabora-bridge', {
category: 'nextcloud collabora',
color: '#7950a2',
defaults: {
name: { value: '' },
config: { type: 'nc-collab-config', required: true },
operation: { value: 'ncFileToPdf' }
},
inputs: 1,
outputs: 1,
icon: 'font-awesome/fa-exchange',
label: function () {
return this.name || this.operation;
}
});
</script>
<script type="text/html" data-template-name="collabora-bridge">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</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-operation"><i class="fa fa-wrench"></i> Pipeline</label>
<select id="node-input-operation">
<option value="ncFileToPdf">ncFileToPdf</option>
<option value="ncFileToPng">ncFileToPng</option>
<option value="ncFileToHtml">ncFileToHtml</option>
<option value="htmlToOffice">htmlToOffice</option>
<option value="fillTemplateSave">fillTemplateSave</option>
<option value="compareVersionsPdf">compareVersionsPdf</option>
<option value="extractToPayload">extractToPayload</option>
<option value="createAssetLink">createAssetLink</option>
</select>
</div>
</script>
<script type="text/html" data-help-name="collabora-bridge">
<p><strong>Ready-made pipelines.</strong> Chains WebDAV + CODE + (sometimes) OCS and usually writes back to Nextcloud. This is the node you'll reach for most often.</p>
<p>Default destination: <code>/Dokument/OfficeOut/</code> unless you set <code>destNcPath</code> / <code>destFolder</code> / <code>destName</code>.</p>
<table style="width:100%; font-size:11px;">
<tr><th>Operation</th><th>Result</th></tr>
<tr><td><code>ncFileToPdf</code></td><td>PDF saved in NC</td></tr>
<tr><td><code>ncFileToPng</code></td><td>Preview PNG</td></tr>
<tr><td><code>ncFileToHtml</code></td><td>HTML in NC</td></tr>
<tr><td><code>htmlToOffice</code></td><td>HTML → docx/pdf …</td></tr>
<tr><td><code>fillTemplateSave</code></td><td>Fill template via OCS, save in NC</td></tr>
<tr><td><code>compareVersionsPdf</code></td><td>Diff PDF (new + <code>compareNcPath</code>)</td></tr>
<tr><td><code>extractToPayload</code></td><td>Field JSON in msg</td></tr>
<tr><td><code>createAssetLink</code></td><td><code>msg.assetUrl</code> for insert</td></tr>
</table>
<p>Override via <code>msg.operation</code>. Does not overwrite originals unless <code>msg.allowOverwrite=true</code>.</p>
<p>The other palette nodes are building blocks when bridge isn't enough.</p>
<pre>inject { ncPath: "/Documents/contract.docx" }
→ collabora-bridge (ncFileToPdf)
→ debug { destNcPath: "/Dokument/OfficeOut/contract.pdf" }</pre>
<p><strong>Rule of thumb:</strong> PDF in Nextcloud → <code>ncFileToPdf</code>. Fill template → <code>fillTemplateSave</code>. Open in browser → <code>nc-office document:direct</code>.</p>
</script>