In This Topic
Reference Guides / JavaScript API / Events / RegisterOnRedactionMarksApplied

RegisterOnRedactionMarksApplied

In This Topic
 RegisterOnRedactionMarksApplied

This function allows you to trigger a function of your own when the redaction marks applied event is fired.

RegisterOnRedactionMarksApplied: function (docuViewareID, callback)

Parameters

docuViewareID
The identifier for the DocuVieware™ instance.
callback
The function you want to execute on event.

Return Value

1 if error.

Example of usage

This JavaScript makes sure the DocuVieware control is properly loaded and initialized and then subscribes to the event on load.

function RegisterOnRedactionMarksAppliedOnDocuViewareAPIReady() {
    if (typeof DocuViewareAPI !== "undefined" && DocuViewareAPI.IsInitialized("DocuVieware1")) {
        DocuViewareAPI.RegisterOnRedactionMarksApplied("DocuVieware1", function () { console.log("printed"); });
    }
    else {
        setTimeout(function () { RegisterOnRedactionMarksAppliedOnDocuViewareAPIReady() }, 10);
    }
}
document.addEventListener("DOMContentLoaded", function () {
    RegisterOnRedactionMarksAppliedOnDocuViewareAPIReady();
}, false);