27 lines
397 B
JavaScript
27 lines
397 B
JavaScript
export default {
|
|
type: "io_text",
|
|
name: "Text",
|
|
colour: 180,
|
|
description: "A String of text",
|
|
|
|
connections: {
|
|
mode: "value",
|
|
output: [ "expression", "string" ],
|
|
},
|
|
|
|
template: `"%TEXT`,
|
|
|
|
fields: {
|
|
TEXT: {
|
|
text: ''
|
|
}
|
|
},
|
|
|
|
generators: {
|
|
json: block => {
|
|
const text = block.getFieldValue('TEXT')
|
|
|
|
return [ JSON.stringify(text), 0 ]
|
|
}
|
|
}
|
|
}
|