Add node for an editable multiline string

This commit is contained in:
zer0gear
2024-11-10 02:01:06 -06:00
parent 8bcba08f89
commit 2453c1c04a
2 changed files with 19 additions and 1 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
from .multiline_string import MultilineStringNode
from .list_concat_node import ListConcatNode
NODE_CLASS_MAPPINGS = {
"List Concat Node": ListConcatNode
"List Concat Node": ListConcatNode,
"Multiline String Node": MultilineStringNode,
}
__all__ = ["NODE_CLASS_MAPPINGS"]
+16
View File
@@ -0,0 +1,16 @@
class MultilineStringNode:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"input_string": ("STRING", {"default": "", "multiline": True}),
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("Output",)
OUTPUT_TOOLTIPS = ("The multiline string",)
INPUT_IS_LIST = True
FUNCTION = "return_string"
CATEGORY = "text utility"
def return_string(self, input_string):
return (input_string[0],)