Files
jammyfu-ComfyUI_PaintingCod…/modules/text/simple_text_input.py
T
jammyfu 3865813a7c Refactor node mappings to include PaintingCoder namespace and enhance workflow fixer UI
- Updated NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS across multiple modules to prepend 'PaintingCoder::' to node names for better organization.
- Enhanced the workflow fixer HTML with a new layout, language toggle feature, and improved styling for better user experience.
- Added functionality for selecting fix types and path conversion options in the workflow fixer tool.
- Improved error handling and success messages in the workflow fixer script.
2025-01-21 17:48:55 +08:00

39 lines
1009 B
Python

# -*- coding: utf-8 -*-
# Filename: simple_text_input.py
# Developer: jammyfu
# Category: 🎨Painting👓Coder/📝Text
from ..text.i18n import I18n
class SimpleTextInput:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"text": ("STRING", {
"default": "",
"placeholder": I18n.get_text("simple_text_input.placeholder", "在此输入文本..."),
}),
},
"_meta": {
"preferred_width": 300,
"maintain_dimensions": True
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
FUNCTION = "process"
CATEGORY = "🎨Painting👓Coder/📝Text"
def process(self, text):
return (text,)
# 添加到 ComfyUI 节点注册
NODE_CLASS_MAPPINGS = {
"PaintingCoder::SimpleTextInput": SimpleTextInput,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"PaintingCoder::SimpleTextInput": "Simple Text Input 📝",
}