Commit fbc645e7 authored by Seth Meranda's avatar Seth Meranda
Browse files

Merge pull request #2 from erasmussen2/master

Closes #1
parents d2e8c253 cf173545
......@@ -5,7 +5,7 @@
var Unl = {};
Unl.hasParentNodeWithClass = function(childNode, parentClass) {
for (var selectedNode = childNode; selectedNode.id != 'maincontent'; selectedNode = selectedNode.parentNode) {
for (var selectedNode = childNode; selectedNode.id != 'maincontent' && !selectedNode.body; selectedNode = selectedNode.parentNode) {
if (typeof selectedNode.className !== 'undefined' && selectedNode.className.search(parentClass) >= 0) {
return selectedNode;
}
......@@ -453,4 +453,4 @@ Unl.hasParentNodeWithClass = function(childNode, parentClass) {
// Register plugin
tinymce.PluginManager.add('unl', tinymce.plugins.UnlPlugin);
})();
\ No newline at end of file
})();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment