How to highlight specific text without modifing the doc itself?

I am trying to scan texts for the whole doc and then highlight them

First, I use

connector.callCommand(function () {
    let oDocument = Api.GetDocument();
    let paragraphs = oDocument.GetAllParagraphs();
    paragraphs[xxx in loop].GetText()

to get all texts

Then, call some interface to scan and return hit texts and its range

Then, use

oRange = oParagraph.GetRange(27, 30);

to highlight

but when i do this, the style change will be pushed into undo/redo stack and also shown in changes to review, like the user is really editing

so my question is, how to highlight specific text without modifing the doc itself? like svg or others?

Hello @kgn :santa:

Unfortunately, at the moment, the only way to “highlight” text using your scenario is to add a background to the text in the document (creating a modification in the document).

I’ve forwarded your idea/suggestion to our developers.

The question of the implementation timeline arises here. The task will have a standard priority, and I won’t be able to provide you with specific timelines for its implementation.

I’m sorry I couldn’t get you a New Year’s gift. :smiling_face_with_tear:

It’s possible that we are referring to this suggestion.

thanks a lot​:pray::pray::pray:,wait for your good news, and i’ll also keep finding some way to hack

1 Like