TinyMCE – getNode() does NOT work in IE

This is a strange issue…

getNode()

Read More

Trying to add a tinyMCE button (inside WordPress) that opens a TinyMCEPopup window.

There I need to check the current NODE where the user has clicked inside the text — specifically if they have clicked inside a LI node/tag.

I’m using:

tinyMCE.activeEditor.selection.getNode().nodeName

Works well inside, FireFox, Chrome etc, but NOT in IE.

In IE I always get the node “DIV” and…

In IE it actually checks a completely different portion of the markup, like… it seems to get the parent node of the whole TinyMCE editor markup instead of where the user has clicked.

That’s why it always returns a DIV.

In IE, when I click inside a LI element (in the visual view of the editor), it puts a strange frame around, which does not put my cursor inside that list element, unless I double-click the frame. See this screenshot here: http://screencast.com/t/9HVjMUvy

getContent()

Does also NOT seem to work in IE…

tinyMCE.activeEditor.selection.getContent()

(IE returns always “empty”, nothing selected, while all other browsers give correctly selected portion of the text)

Any ideas how to fix these?

Much appreciated!

Related posts

Leave a Reply

1 comment