How-to send data from plugin

Hi, everyone.
I build a plugin need get list of text from API to insert into document.
But, the API require Jwt token.

How to send datas from Document Editor from Plugin?
How to get this Datas?

How the plugin run in iFrame, not is possible get the values from local storage?

While composing the document, I would like to load the list of variables through the OnlyOffice plugin, similar to the existing (Invoices) plugin. Upon clicking, I want to insert the corresponding value at the POSITION where the cursor is located, in order to obtain the paragraph where the cursor is positioned and add text at that point. Is this possible?

Hey @DouglasEleuterio

I got a little confused with your questions.

Perhaps this example will be suitable for you to solve your tasks.

Please take a look at this: https://github.com/ONLYOFFICE/sdkjs-plugins/tree/develop/externallistener

Let’s go step by step.

What do you need to accomplish and how would you like to implement it? For now, if I understood correctly, the “Invoices” plugin is enough for you.