How to find the definition of global variable like AscFormat in sdkjs

I want to add some custom presentation API , by modify the source codes of document builder sdkjs.

I find the source codes is written by JavaScript, rather than TypeScript.

I try to read the codes. But can’t understand how these global variable import to context.

Please tell me how to find the definition of global variable. I want to know all the properties and methods of them.

// global.js
var Asc;
var AscDFH;
var AscCH;
var AscFormat;
var AscFonts;
var AscCommon;
var AscCommonWord;
var AscCommonExcel;
var AscCommonSlide;
var AscBuilder;
var AscWord;
var AscMath;
var AscJsonConverter;
var AscCrypto;
var AscOForm;

Hello @Ocean

Can you provide more details about the scenario that you’d like to achieve?

In general, these variables are used for simplification:

// This file contains definition of object which used in api.js
// It need to prevent minimize the name of object’s method.

Hello @Constantine , thanks for your reply. :grinning:

I want to know how to set the Drawing, that let it can’t be deleted but still can edit text.

I have already read the ApiDrawing, then found the SetLockValue method. But it didn’t have lock type for setting it can’t be deleted.

Thank you.

Do you mean that after adding an image via Document Builder methods you want to set it to be undeletable but with possibility to change the text inside the shape in the editors interface? If so, have you ever seen such possibility in other processors?


By the way, about global variables definitions: I have found out that mentioned variables are used for correct work of Google Closure Complier to minimize scripts and nothing else. I’m afraid there is no way to use them on practice.

Public API documentation is available here: api.onlyoffice.com