Try the fastest and simplest way to install ONLYOFFICE

Insert images won't show at the first time, need refresh

Integration questions/issues

Insert images won't show at the first time, need refresh

Postby poplee » Fri Mar 23, 2018 5:46 am

Hi Maxim,

I use the plugin function to insert images into words in a field like this:
{
"Props" :
{
"Id" : 2,
"Tag" : "InsertImg",
"Lock" : 3
},

"Script" : "var oDocument = Api.GetDocument();var oParagraph = Api.CreateParagraph(); oDrawing = Api.CreateImage('http://xxxx/image001.png', 60 * 36000, 35 * 36000); oParagraph.AddDrawing(oDrawing);oDocument.InsertContent([oParagraph]);"
}

The problem is, every time after insertion, the images won't show directly, only a red cross there, I need to refresh the url to load the images. Any idea why this happened? and how can I fix it. Thanks.

Best,
poplee
 
Posts: 7
Joined: Wed Mar 14, 2018 3:44 am

Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest