Hello,<br><br>I'm working on wiki based on semantic web technologies, <a href="http://argentera.inria.fr:8080/wiki/data/Main/MainHome.jsp">sweetwiki</a>, and we are using kupu as editor.<br>We have extended it to add some wiki's features.
<br>We have this function, which gets the selected node and perform an action on it (it replaces the node or adds an attribute depending on the type of the node) :<br><br>function noWikiWord(){<br> var selectedNode =
kupu.getSelectedNode();<br> if(selectedNode.getAttribute('property') == 'noWikiWord'){<br> selectedNode.removeAttribute('property');<br> }else if ( selectedNode.nodeName == 'A'){<br> var newnode =
kupu.getInnerDocument().createElement('span');<br> newnode.setAttribute('property', 'noWikiWord');<br> var text = selectedNode.text;<br> var textnode = kupu.getInnerDocument().createTextNode(text);
<br> newnode.appendChild(textnode);<br> selectedNode.parentNode.replaceChild(newnode,selectedNode);<br> }else{<br> var newnode = kupu.getInnerDocument().createElement('span');<br>
newnode.setAttribute('property', 'noWikiWord');<br> var selection = kupu.getInnerDocument().getSelection();<br> var textnode = kupu.getInnerDocument().createTextNode(selection);<br> newnode.appendChild
(textnode);<br> kupu.insertNodeAtSelection(newnode, 1);<br> }<br> }<br><br>it works well with firefox but we have a problem wih IE. I've tested and it appears that it's the function "kupu.getSelectedNode
();" which doesn't work on IE.<br>I've seen that there is a problem with this function on this discussion: <a href="http://codespeak.net/pipermail/kupu-dev/2005-February/001131.html">http://codespeak.net/pipermail/kupu-dev/2005-February/001131.html
</a>.<br>how can I fix it?<br><br>-- <br>Guillaume Erétéo