findReplaceHitEvent
Description
This event fires when users use the Find and Replace functionality and use the Next or Previous buttons. This allows API script to do something extra with the node.
Example
Editor.addEventListener("error", showError);
Editor.addEventListener("findReplaceHitEvent", findReplaceHit);
function findReplaceHit(evt)
{
var node = evt.contextNode;
console.log("User found a matching string in text node", node);
}
findReplaceHitEvent event
Properties
- contextNode
-
XopusText. The text node containing the search for string. - startOffset
- Integer. Start offset of the found text in the text node's context.
- endOffset
-
Integer
String. End offset of the foudn text in the text node's context.