Merge pull request #30 from adafruit/tylerdcooper-patch-8
docs: multiline text block
This commit is contained in:
commit
45348bbd81
1 changed files with 2 additions and 6 deletions
|
|
@ -3,25 +3,21 @@ export default {
|
||||||
type: 'io_text_multiline',
|
type: 'io_text_multiline',
|
||||||
name: "Multiline Text",
|
name: "Multiline Text",
|
||||||
colour: 180,
|
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: {
|
connections: {
|
||||||
mode: "value",
|
mode: "value",
|
||||||
output: [ "expression", "string" ],
|
output: [ "expression", "string" ],
|
||||||
},
|
},
|
||||||
|
|
||||||
template: "¶ %TEXT",
|
template: "¶ %TEXT",
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
TEXT: {
|
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: ''
|
multiline_text: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
generators: {
|
generators: {
|
||||||
json: block => {
|
json: block => {
|
||||||
const text = block.getFieldValue('TEXT')
|
const text = block.getFieldValue('TEXT')
|
||||||
|
|
||||||
return [ JSON.stringify(text), 0 ]
|
return [ JSON.stringify(text), 0 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue