How to implement OnEnter and OnExit event on ContentControl using Javascript API for Word 2016
问题 There are many contentcontrols in a document and I need to find out a way that the cursor is in which content control so that I will select that control and do the operation accordingly. I think by implementing onEnter and onExit events for contentcontrols , I can achieve it. But I don't know how to declare and invoke those eventhandlers in JavaScript api. Any help is really appreciated. 回答1: You would need to use a combination of APIs to implement that functionality with the current API set: