Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
danilocelic *TMM* #1
Re: dom.getSelectedNode
yeudoi wrote:
Try:> Hi,
>
> I use dom.getSelectedNode() to get the selected node in my extension. I
> noticed that it returns the single tag, or the innermost parent of the tags
> selected, if more than one tag is selected? Is it true always? I want to be
> able to know to get just the tags selected. In case of table, I want to be
> able to get only the selected cells, and not the whole table. Is there a way?
> I am stucked.
var dom = dw.getDocumentDOM();
var selections = dom.getSelection(true);
that will give pairs of selection offsets if multiple items are selected. Then use: dom.offsetsToNode() to get a reference to each of the nodes selected.
HTH
--
Enjoy,
Danilo Celic
| Extending Knowledge Daily
| [url]http://www.CommunityMX.com/[/url]
danilocelic *TMM* Guest
-
yeudoi #2
Re: dom.getSelectedNode
Thank you very much Danilo.
You are so smart!!!!
It works!!!!
:)
--yeudoi
yeudoi Guest



Reply With Quote

