If this isn't the appropriate forum for this question, I apologize. Please remove it if that's the case. I know that Elementary OS developers use Vala for their development and I'm unaware of a more appropriate forum where such a question can be asked of them... So, in Vala/Gtk3, I need to gain access to the serialized contents of a Gtk.TextBuffer (linked to a Gtk.TextView widget) including all of the Gtk.TextTags which have been applied to the text. This is so that I can translate each of the formatted (bolded, italicized, etc.) parts of the text to Pango markup which can then be inserted into another Widget. Can someone provide insight into how this is done? As you can see from the following linked post, I've attempted this using the Gtk.TextBuffer's register_serialize_tagset() and serialize() methods but unfortunately, this only results in obtaining an XML header that contains just one line of text: "GTKTEXTBUFFERCONTENTS-0001". Is there some other means that Elementary OS Vala developers typically employ to gain access to a Gtk.TextBuffer's serialized text? How exactly does one go about saving the "rich text" contents of Gtk.TextView widget to a database (or even to an ordinary file) if this doesn't work?
[https://stackoverflow.com/questions/68580733/how-do-i-obtain-the-complete-serialized-text-from-a-gtk-textview-in-vala]
data[31:];
todata[31:data.length];
though.