Merge pull request #30 from adafruit/tylerdcooper-patch-8

docs: multiline text block
This commit is contained in:
Loren Norman 2025-08-19 13:45:37 -04:00 committed by GitHub
commit 45348bbd81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,25 +3,21 @@ export default {
type: 'io_text_multiline',
name: "Multiline Text",
colour: 180,
description: "A String of longer-form text with newlines.",
description: "Create formatted text content with multiple lines, paragraphs, and line breaks. Perfect for composing detailed email messages, creating formatted reports with sensor data, writing multi-paragraph notifications, or building structured text content that needs proper formatting and readability across multiple lines.",
connections: {
mode: "value",
output: [ "expression", "string" ],
},
template: "¶ %TEXT",
fields: {
TEXT: {
description: "Enter your multi-line text content here. Use Enter/Return to create new lines and paragraphs. Perfect for email templates ('Dear User,\\n\\nYour temperature reading is...\\n\\nBest regards'), formatted reports, detailed notifications, or any text that needs structure and readability.",
multiline_text: ''
}
},
generators: {
json: block => {
const text = block.getFieldValue('TEXT')
return [ JSON.stringify(text), 0 ]
}
}