code: def set_text(self, text):
          
          d = self.declaration
          if d.input_type == 'html':
              text = Spanned(__id__=Html.fromHtml(text))
          self.widget.setTextKeepState(text)
docs: Set the text in the widget.