How to get current paragraph text, using GetCurrentSentence only returns before `.`

Hi @Alexandre ,

I’m working with the OnlyOffice editor and using the GetCurrentSentence method from the plugin API. However, I’ve noticed a limitation in its behavior:

If I place the cursor after the last character of a sentence**, such as right after the period (.), GetCurrentSentence returns an empty string.

  • For example, in the sentence:
    "This is a sentence."
    If I place the cursor right after the period, it gives me nothing. But if I place it within the sentence, it returns "This is a sentence." as expected.

:question: What I’m trying to achieve:

I want to be able to extract the entire paragraph text or at least the current sentence, even when the cursor is placed at the end of the sentence or paragraph.

The main reason i require this is to identify the paragraph which user has its cursor on.