Moni Mad wrote:
>
> I have a text and with double-click I mark one word in this text. How is
> it possible to find out the name of the parent-node without losing the
> currently set markup?
>
> Example:
> <text>This <bold>is an</bold> example!</text>
> Now I mark the word "an" and want to get an alert with the word "bold",
> because "bold" is the parent's node-name.
>
The text selection comprises the characters between 2 marks: the dot and
the mark. Therefore suffice to show the name of the parent element of
the dot (or the mark if you prefer).
Example (add this macro to your customize.xxe to give it a try):
---
<command name="showDotParent">
<macro trace="true">
<sequence>
<get context="$dot" expression="local-name(./..)"/>
<command name="alert" parameter="%_" />
</sequence>
</macro>
</command>
<binding>
<keyPressed code="F4" />
<command name="showDotParent" />
</binding>
---
See XMLmind XML Editor - Commands, Variables mapped to the selection in
XXE, http://www.xmlmind.com/xmleditor/_distrib/doc/commands/index.html
---
PS: This kind of support is reserved to the customers of Professional
Edition. Please use a registered email address or if you fear to be
spammed, please identify yourself as a customer of Professional Edition.
Of course, *never* disclose your license number; just tell us what is
the name of your company.