Quote:
Originally Posted by xelawho
I need to find the contenteditable div that a text node belongs to
|
I would have thought this would do it:
Code:
function getEditableParent( elem )
{
while( elem && !elem.parentNode.contentEditable )
elem = elem.parentNode;
return elem ? elem.parentNode : null;
}