Find and Replace in documents with SRVControls

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
mcperes
Posts: 6
Joined: Thu Jan 04, 2018 10:38 pm

Find and Replace in documents with SRVControls

Post by mcperes »

if not editor1.srv.StartEditing(Editor) then
exit;
editor1.srv.CanUpdate := False;
editor1.srv.ActiveEditor.SetSelectionBounds(
0, editor1.srv.ActiveEditor.GetOffsBeforeItem(0),
0, editor1.srv.ActiveEditor.GetOffsBeforeItem(0));
while (editor1.srv.ActiveEditor.SearchText(InSearch,[
RVEdit.TRVESearchOption.rvseoDown])) do
editor1.srv.ActiveEditor.InsertText(InReplace, False);
editor1.srv.CanUpdate := True;

(editor1 is a frame and srv is a TSRichViewEdit)

can't find the text in documents with SRVControls
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Find and Replace in documents with SRVControls

Post by Sergey Tkachenko »

Searching in inserted controls is not implemented yet.
GeraldLom
Posts: 1
Joined: Wed Jul 29, 2020 1:30 pm

Find and Replace in documents with SRVControls

Post by GeraldLom »

If I manually add new text to a link and then delete the old text, the link is maintained, but not with "Find and replace", the link is deleted even though the text color says the link is still present. Can this be find and replace be modified to maintain the link since I have 1600 links that I would like to change the names of?
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Find and Replace in documents with SRVControls

Post by Sergey Tkachenko »

Do you mean that when you replace a hyperlink text, its target (i.e. the link's tag) is lost?
I cannot reproduce this problem.
Can you create a simple project to reproduce it?
Post Reply