deserialize_set_can_create_tags


Description:

[ Version ( since = "2.10" ) ]
public void deserialize_set_can_create_tags (Atom format, bool can_create_tags)

Use this function to allow a rich text deserialization function to create new tags in the receiving buffer.

Note that using this function is almost always a bad idea, because the rich text functions you register should know how to map the rich text format they handler to your text buffers set of tags.

The ability of creating new (arbitrary!) tags in the receiving buffer is meant for special rich text formats like the internal one that is registered using register_deserialize_tagset, because that format is essentially a dump of the internal structure of the source buffer, including its tag names.

You should allow creation of tags only if you know what you are doing, e.g. if you defined a tagset name for your application suite’s text buffers and you know that it’s fine to receive new tags from these buffers, because you know that your application can handle the newly created tags.

Parameters:

this

a TextBuffer

format

a Atom representing a registered rich text format

can_create_tags

whether deserializing this format may create tags