Persistency

<< Click to Display Table of Contents >>

Navigation:  Programming > InplaceEditors >

Persistency

A whole document with editors can be saved in WPTOOLS format, i.e. using WPRichText.SaveToStream(stream, 'WPTOOLS').

 

In this format the name and class properties of an editor remain readable, but the other properties are Base64 encoded.

 

<editor version="1" name="COUNTRIES.VAT_RATE" parent="par" data="wpinplace-binary" classname="wpcubed.check">

<!--PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0id2luZG93cy0xMjUyIj8+DQo8cHJvcHM+PENhcHRpb24+PC9DYXB0aW9uPg0KPFRleHQ+WDwvVGV4dD4N

CjxDaGVja2VkIFZhbHVlPSIxIj48L0NoZWNrZWQ+DQo8TnVtYmVyIFZhbHVlPSIwIj48L051bWJlcj4NCjxHcm91cCBWYWx1ZT0iNCI+PC9Hcm91cD4NCjxN

b2RlIFZhbHVlPSIyIj48L01vZGU+DQo8Z3VpPjxwIGlkPSIzMDEiIGl2YWw9IjEiPjwvcD4NCjxwIGlkPSIxMDIiIGl2YWw9IjIiPjwvcD4NCjxwIGlkPSIx

MDMiIGl2YWw9IjIiPjwvcD4NCjxwIGlkPSIzMDQiPjwvcD4NCjxwIGlkPSIzMDUiIGl2YWw9IjEiPjwvcD4NCjxwIGlkPSIxIj48L3A+DQo8L2d1aT4NCjwv

cHJvcHM+DQoA-->

</editor>

 

 

The property PropsAsXML which is part of TWPToolsInplaceEditorAbstractBase can be used to retrieve the values of all properties of the InplaceEditors in form of an ANSI string. The ANSI string is built from XML tags. Unicode strings are encoded as UTF8.

 

The string can be read using the XML classes provided by unit WPXMLInt.

 

PropsAsXML will not read and write the Name and the InplaceClass. So it can be used to store only the content and properties of an editor to be applied to a different editor.