I am working on word addin using office js I have a requirement to detect whether user has entered and moved out of a table during review. I have created the table under a content control. What I need to implement if I click/put cursor using key at any column of table then a global variable value will change to true and when cursor moves outside that table then the variable changes to false and I shall assume user has done some change in table(even if they actually haven't) and I shall save the whole document.
Using below method I am able to detect generic cursor movement event.
Office.context.document.addHandlerAsync("documentSelectionChanged", mySelectionHandler,
function (result) {
//write(result.value)
}
);
However, I couldn't find any mechanism to assert my cursor is within a table or outside that table. Could you help on this?