Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Is there a way to determine parent element of current selection/caret
posted

Is it possible to determine the element (eg. table, tr, td) which contains the current selection in the editor when for example a custom menu item is clicked?

Our ultimate goal for this is to add a custom attribute to the current or parent element containing the selection but to do that we'd need  way to know the element or if there is no element (just all text in the editor). I don't think we can use insertAtCaret for this (or i could be wrong).