How to programatically get an element that is selected/highlighted?

84 views Asked by At

I am working on an application based on ASP.NET, running in IE11.

One part of the application makes use of (Telerik) RadEditor to create a layout of several items. I am selecting the items (dom elements) as seen in the below image. I selected the top item, then the bottom.

Elements selected

Is there a way (in JavaScript) to retrieve the elements (or even a single element)? I need to select the element(s) based on something other than the RadEditor object.

To be clear, I can't use editor.getSelectedElement(); (it doesn't do what I want). document.activeElement;, $(":focus");, document.hasFocus();, and editor.getSelection() all don't return the right objects. There also is no css class or property being applied, so they aren't any help here.

0

There are 0 answers