Document Server version: 9.2.0
Hi team,
We recently started using the newly added onParagraphText event introduced in Document Server 9.2.0 (as mentioned in the changelog: https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHANGELOG.md#920), and we’ve noticed a couple of issues / limitations while integrating it.
Issue 1: Event not emitted when a paragraph is deleted
When an entire paragraph is deleted, the onParagraphText event is not emitted.
Is this expected behavior, or should the event also be triggered when a paragraph is removed from the document?
Issue 2: Event text includes tracked deletions in review mode
When the editor is in Reviewing / Track Changes mode, and a word or sentence is deleted inside a paragraph:
- The
onParagraphTextevent is emitted - However, the
textreturned still contains the deleted content (redlined), rather than the final visible text
This seems to reflect the internal revision state rather than the accepted (final) text.
If this behavior is intentional:
- Is there a way to retrieve the final paragraph text (as if all revisions were accepted) without modifying the document?
We tried calling SetDisplayModeInReview("final") before reading the paragraph text, but this approach modifies the document state, which is not acceptable for our use case.
Question
Is there:
- A read-only API or flag to obtain paragraph text with all revisions accepted?
- Or a recommended approach to extract “final” paragraph text while the document remains in review mode?
Any clarification or guidance would be appreciated.
Thanks in advance!