comparison sat_frontends/jp/xmlui_manager.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 18a98a541f7a
comparison
equal deleted inserted replaced
2782:b17e6fa1e607 2783:442ab697f831
236 236
237 class TextBoxWidget(xmlui_base.TextWidget, StringWidget): 237 class TextBoxWidget(xmlui_base.TextWidget, StringWidget):
238 type = u"textbox" 238 type = u"textbox"
239 239
240 240
241 class XHTMLBoxWidget(xmlui_base.XHTMLBoxWidget, StringWidget):
242 type = u"xhtmlbox"
243
244 def show(self):
245 # FIXME: we use bridge in a blocking way as permitted by python-dbus
246 # this only for now to make it simpler, it must be refactored
247 # to use async when jp will be fully async (expected for 0.8)
248 self.value = self.host.bridge.syntaxConvert(
249 self.value, C.SYNTAX_XHTML, "markdown", False, self.host.profile)
250 super(XHTMLBoxWidget, self).show()
251
252
241 class ListWidget(xmlui_base.ListWidget, OptionsWidget): 253 class ListWidget(xmlui_base.ListWidget, OptionsWidget):
242 type = u"list" 254 type = u"list"
243 # TODO: handle flags, notably multi 255 # TODO: handle flags, notably multi
244 256
245 def show(self): 257 def show(self):