add text notes

This commit is contained in:
2026-03-30 20:47:08 -07:00
parent 7b309a8b23
commit c5c861717a
8 changed files with 291 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ from backend.nodes import (
mask_threshold,
note,
number,
text_note,
range_slider,
rotate,
save,

View File

@@ -0,0 +1,30 @@
from __future__ import annotations
from backend.node_registry import register_node
@register_node(display_name="Text Note")
class TextNote:
"""A floating text card for annotating workflows. Supports Markdown."""
CATEGORY = "Canvas"
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"text": ("STRING", {
"default": "# Guide\n\nDouble-click to edit this note.\n\n- Step 1\n- Step 2",
"multiline": True,
}),
"color": (["default", "blue", "green", "yellow", "red", "purple"], {
"default": "default",
}),
},
}
OUTPUTS = ()
FUNCTION = "noop"
def noop(self, text: str, color: str = "default") -> tuple:
return ()