Home › Forums › General XMetaL Discussion › Xmetal Toolbar macro › Reply To: Xmetal Toolbar macro
Reply to: Xmetal Toolbar macro
November 21, 2012 at 6:09 amHi,
I am developing a code for Mouse_over macro in which when my mouse is over the specific element it shold be seen as a hyperlink,i.e cursor is changed to hand cursor ad color of the text of the node should change.
my element stucture is
….
..
my functionality is when my mouse is over the node named
bI am using following code from journalist.mcr
var curNode = Application.MouseOverNode;
if (curNode) {
var nodeName = curNode.NodeName;
if (nodeName == “element”) {
Application.SetCursor(sqCursorHand);
var rng = ActiveDocument.Range;
rng.SelectNodeContents(curNode);
rng.ContainerStyle = “color:red”;
rng = null;
return;
}
but the above code changes the color of the entire content of the
what is the way to select only the PCDATA string i.e text-string
and change the color of that TEXT-Node only
Please reply
Regards