When the value in Taxonomy picker control (ScriptForWebTaggingUI
) is changed, the event Microsoft.SharePoint.Taxonomy.ScriptForWebTaggingUI.onTextChanged
is triggered by default.
This custom event could be registered for Taxonomy picker control as demonstrated below:
function initTaggingControl() {
RTE.CanvasEvents.registerListener(RTE.CanvasEvents.editableRegionChangedEvent, Function.createDelegate(null, onCustomTextChanged));
}
function onCustomTextChanged(sender, args) {
if(args.editableRegion.innerText.length > 0){ //if value is specified?
console.log(args.editableRegion.innerText); //print term label
}
}
ExecuteOrDelayUntilScriptLoaded(initTaggingControl, 'ScriptForWebTaggingUI.js');
In the specified example term label will be printed every time once
the term is selected.
You also might be interested to find more details about ScriptForWebTaggingUI
control in this post.