AdvMemo

I have just purchased Advmemo and replaced the existing standard TMEMO


I have a routine that inserts <mbp:pagebreak /> at the caret  position

CurPoint:=Editor.CaretPos

var
CurPoint: TPoint;
cText: string;
cLine: string;
begin
cLine:='<mbp:pagebreak />';
CurPoint:=Editor.CaretPos;
cText:=Editor.Lines[CurPoint.y];
cText:=Copy(cText,0,CurPoint.x)+cLine+Copy(cText,CurPoint.x+1,Length(cText));
Editor.Lines[CurPoint.y]:=cText;
end;

Editor is the name of the Advmemo

It worked fine in TMemo but now with Advmemo caretPos is not recognized - so how do I insert a word or anything at the caret position?

Thanks

Fred