How to get the index of the paragraph where the cursor is located?

cs1137195420 1 Reputation point
2022-05-18T08:59:54+00:00

Hello, I am new to Word JavaScript API and trying to compare paragraphs before and after cursor changes.
I've tried getSelectedDataAsync, but it can only provide the selected text. I also tried addHandlerAsync to get EventArgs to see whether it contain index of the paragraph but failed.
How can I get the index of the paragraph where the cursor is located? Thanks!

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
871 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,508 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
893 questions
{count} votes