Hi!
I need to check if my text contains any non-deleted embedded objects before saving. How can I do this?
I have tried looping through TWPRichText.TextObjects and for each object I have the following function:
function IsReferred: Boolean;
var
Tag: Integer;
Item: PWPListItem;
begin
Tag := Self.WPRichText.Memo.TxtObjLst.FindTag(WPObj);
Item := Self.WPRichText.Memo.TxtObjLst.Find(Tag);
if (Item<nil>0) then
Result := true
else
Result := false;
end;
Unfortunately this does not work for objects that have been copied from one place to another in the editor.
Regards,
Erik