I want to add some custom presentation API , by modify the source codes of document builder sdkjs.
For example, add GetAllTables method to sdkjs/slide/apiBuilder.js. Then I build the sdk-all.js by grunt, and replace the original sdk-all.js in my server.
/**
* Returns an array with all the table objects from the slide.
* @typeofeditors ["CPE"]
* @returns {ApiTable[]}
* */
ApiSlide.prototype.GetAllTables = function(){
var apiTables = [];
if (this.Slide)
{
var drawingObjects = this.Slide.getDrawingObjects();
for (var nObject = 0; nObject < drawingObjects.length; nObject++)
{
if (drawingObjects[nObject] instanceof AscFormat.CGraphicFrame)
apiTables.push(new ApiTable(drawingObjects[nObject]));
}
}
return apiTables;
};
But it cause javaScript error, even can't load the ppt as before.
How can i add some custom API to document builder sdk?
I also try to read the codes. But can’t understand how these global variable like AscFormat import to context.
// 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;
Please tell me how to find the definition of these global variable. I want to know all the properties and methods of them.
I want to add some custom presentation API , by modify the source codes of document builder sdkjs.
For example, add GetAllTables method to sdkjs/slide/apiBuilder.js. Then I build the sdk-all.js by grunt, and replace the original sdk-all.js in my server.
But it cause javaScript error, even can't load the ppt as before.
How can i add some custom API to document builder sdk?
I also try to read the codes. But can’t understand how these global variable like AscFormat import to context.
Please tell me how to find the definition of these global variable. I want to know all the properties and methods of them.
DocumentBuilder version: 7.4.1
Operating system: Server: centOS 7.9.0 Client: macOS Chrome 124.0.6367.78