Usually you do this somehwre in the Parse() function of your custom reader.
I do this in the Parse() function. But I found out that when I set WithClear to true it works (in the LoadFromStream function). If WithClear is set to false it does not work.
The problem now is that when WithClear is true all my styles gets deleted.
I saw that the TWPCustomRtfEdit.LoadFromStream calls TWPCustomRtfEdit.Clear which calls TWPRTFDataCollection.Clear with no parameters which means delete all styles.
To delete the RTFProps.Locked must be false. Is that something I can use to avoid all my styles getting deleted? Or do you have any other ideas?