That should be no problem as load on the shape is only called during loading
the shape and not while it already has some content. So there should be no
commands in the QTextDocument stack which will be undone by the application
after loading.

Very true. That would clear the undoStack of the new QTextDocument. The other QTextDocuments and their corresponding KoTextEditor shouldn't be affected.
It is actually a pretty elegant solution.
 

Pierre