Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Barry
TinyMCE
Commits
cf173545
Commit
cf173545
authored
Apr 18, 2013
by
Eric Rasmussen
Browse files
[gh-1] Fix Unl.hasParentNodeWithClass for plain text nodes
parent
d2e8c253
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/unl/editor_plugin.js
View file @
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
})();
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment