跳到主要内容

sendToPlugin

Sends a message from the modal window to the plugin.

Syntax

expression.sendToPlugin(name, data);

expression - A variable that represents a Plugin class.

Parameters

NameRequired/OptionalData typeDefaultDescription
nameRequiredstringThe event name.
dataRequiredobjectThe event data.

Returns

boolean

Example

function makeConvetration() {
if (window.Asc.plugin.windowID) {
window.Asc.plugin.sendToPlugin("onWindowMessage", {config: oConfig});
} else {
window.Asc.plugin.executeMethod('ConvertDocument', [oConfig.convertType, oConfig.htmlHeadings, oConfig.base64img, oConfig.demoteHeadings, oConfig.renderHTMLTags], function(sOutput) {
document.getElementById("text-area").value = sOutput;
});
}
};