Visit ComfyUI Online for ready-to-use ComfyUI environment
Versatile text manipulation tool for appending/prepending content, crucial for dynamic text modifications.
The TextAppendNode is a versatile tool designed to manipulate text by either appending or prepending new content to existing text. This node is particularly useful for AI artists and content creators who need to dynamically modify text data, such as generating variations of text prompts or combining different text elements. By offering the ability to choose between appending and prepending modes, the node provides flexibility in how text is structured and presented. This functionality can be crucial in scenarios where the order of text elements impacts the meaning or effectiveness of the content. The node processes each line of the input texts individually, ensuring that the resulting text is neatly formatted and free of unnecessary whitespace.
The current_text parameter is a multiline string input that represents the existing text to which new content will be added. This parameter is crucial as it serves as the base text that will be modified by either appending or prepending new lines. The text is processed line by line, and any leading or trailing whitespace is removed to ensure clean formatting. There are no specific minimum or maximum values for this parameter, but it should be a valid string input.
The new_text parameter is also a multiline string input that contains the text to be added to the current_text. This parameter is essential for introducing new content into the existing text structure. Like current_text, it is processed line by line, with whitespace stripped from each line. This ensures that the appended or prepended text integrates seamlessly with the existing content. There are no specific constraints on the length or content of this parameter, but it should be a valid string input.
The mode parameter determines how the new_text is integrated with the current_text. It offers two options: "append" and "prepend". In "append" mode, the new_text is added to the end of each line of the current_text, while in "prepend" mode, it is added to the beginning. This parameter is crucial for controlling the order and structure of the resulting text. The default value is not specified, so users must explicitly choose one of the available options.
The output of the TextAppendNode is a single multiline string that represents the modified text after the append or prepend operation. This output is the result of combining the current_text and new_text according to the specified mode. Each line of the current_text is paired with each line of the new_text, resulting in a comprehensive combination of the two inputs. The output is formatted to ensure that each line is clean and free of unnecessary whitespace, making it ready for further processing or use in text-based applications.
current_text and new_text are free of unnecessary whitespace before inputting them into the node.new_text values while keeping the current_text constant.current_text or new_text is empty, the node may not produce the expected output.current_text and new_text contain valid string data before processing.mode parameter is not set to either "append" or "prepend", the node will not function correctly.mode parameter is explicitly set to either "append" or "prepend" to ensure proper operation.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.