Mercurial > libervia-backend
diff sat_frontends/tools/xmlui.py @ 2783:442ab697f831
frontends, jp, templates: added XHTMLBox widget:
for jp, the XHTML is rendered for now using markdown.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 19 Jan 2019 11:39:02 +0100 |
parents | 003b8b4b56a7 |
children | 5ba98fd6c9a4 |
line wrap: on
line diff
--- a/sat_frontends/tools/xmlui.py Sat Jan 19 11:39:02 2019 +0100 +++ b/sat_frontends/tools/xmlui.py Sat Jan 19 11:39:02 2019 +0100 @@ -116,12 +116,22 @@ class TextBoxWidget(Widget): """Input widget with require a long, possibly multilines string + often called TextArea in toolkits """ pass +class XHTMLBoxWidget(Widget): + """Input widget specialised in XHTML editing, + + a WYSIWYG or specialised editor is expected + """ + + pass + + class BoolWidget(Widget): """Input widget with require a boolean value often called CheckBox in toolkits @@ -582,6 +592,11 @@ _xmlui_parent, value, self._isAttrSet("read_only", node) ) self.ctrl_list[name] = {"type": type_, "control": ctrl} + elif type_ == "xhtmlbox": + ctrl = self.widget_factory.createXHTMLBoxWidget( + _xmlui_parent, value, self._isAttrSet("read_only", node) + ) + self.ctrl_list[name] = {"type": type_, "control": ctrl} elif type_ == "bool": ctrl = self.widget_factory.createBoolWidget( _xmlui_parent,