is there a way to update the content covered by a textMarker as returned from the
doc.markText(...) function without removing the textMarker? In my usecase I place a inline widget over a piece of text “[pathToImage, zoom=2]”. The user can update the zoom level from the widget and this change should be reflected in the document as well, e.g. replace:
[pathToImage, zoom=2] → [pathToImage, zoom=3]
When I use the
doc.replaceRange(...) method, the created textMarker is removed and I have to create a new textMarker object by calling
doc.markText(...). Is there a way to replace the text content and keep the textMarker applied to the document?
Alternativly, is there a way to reattach a former created
TextMarker object to a document again? E.g. something like
doc.attachTextMarker(textMarker, from, to).
What do you think?
Cheers and thanks a lot for such an amazing editor