i can get richtext from textbuffer with this:
exported = self.textbuffer.serialize(
self.textbuffer,
self.textbuffer.register_serialize_tagset(),
start_iter,
end_iter
)
how can i set text into textBuffer?
i somehow completly missed this in The docs .
http://lazka.github.io/pgi-docs/Gtk-3.0/classes/TextBuffer.html#Gtk.TextBuffer.deserialize
deserialize (content_buffer, format, iter, data)
This function deserializes rich text in format format and inserts it at iter. formats to be used must be registered using
Gtk.TextBuffer.register_deserialize_format()
orGtk.TextBuffer.register_deserialize_tagset()
beforehand.
Which is the answer i was looking for