Namespace: plugs

lib/basicgen.private. plugs

API for plugins.

Officegen plugins can extend officegen to support more document formats.

Examples how to do it can be found on lib/gendocx.js, lib/genpptx.js and lib/genxlsx.js.

Example

Adding a new document type to officegen

var baseobj = require ( "officegen" );

function makeMyDoc ( officegenObj, typeCodeName, options, officegenObjPlugins, typeInfo ) {
	// officegenObjPlugins = Plugins access to extend officegenObj.
}

baseobj.plugins.registerDocType (
	'mydoctype', // The document type's code name.
	makeMyDoc,
	{},
	baseobj.docType.TEXT,
	"My Special Document File Format"
);