Skip to main content
Version: v2023.18.0

Textual content

Using lasso feature

  • Object : getARenderJS()

The lasso feature is available since version 4.5. The principle is to register for an event, then to activate the lasso mode, which will allow the user to select a text in the document which will be retrieved with the registered event. For example, this text can be used subsequently to automatically fill in a text field.

FunctionDescriptionArgument
registerNotifyLassoSelectedTextEvent(callback)Registers a callback function to call in case of text retrieval with the lassocallback : The callback function to call in case of text retrieval with the lasso
askActivateLassoMode(lassoID)Activate lasso mode with an id that will be returned at the same time as the selected textlassoID : ID to identify where the activation of the lasso mode comes from for the use of the retrieved text
askDeactivateLassoMode()Deactivate the lasso mode
var arenderjs;

function arenderjs_init(arenderjs_) {
arenderjs = arenderjs_
arenderjs.registerNotifyLassoSelectedTextEvent(function (text, lassoID) {
armt_onSubmitNotifyLassoSelectedTextEvent(text, lassoID);
});
}

function armt_onSubmitNotifyLassoSelectedTextEvent(text, lassoID) {
var elem = document.getElementById(lassoID);
elem.innerHTML = text;
}

function armt_activatingLasso(lassoID) {
arenderjs.askActivateLassoMode(lassoID);
}

function armt_deactivatingLasso() {
arenderjs.askDeactivateLassoMode();
}