27 |
|
parent = editor.getParentElement();
|
28 |
|
if ((parent.tagName.toLowerCase() == "span") &&
|
29 |
|
(parent.className.toLowerCase()=="campsite_subhead")) {
|
30 |
|
editor.selectNodeContents(parent);
|
31 |
|
//editor._doc.execCommand("unlink", false, null);
|
32 |
|
editor.updateToolbar();
|
33 |
|
return false;
|
34 |
|
}
|
35 |
|
else {
|
36 |
|
editor.surroundHTML('<span class="campsite_subhead">', '</span>');
|
|
27 |
if (!HTMLArea.is_ie) {
|
|
28 |
// This statement crashes in the most bizarre way on IE.
|
|
29 |
// If you remove the "parent = " here, then it doesnt crash.
|
|
30 |
// So IE will allow subheads within subheads (bad), while
|
|
31 |
// the code below will prevent that for the other browsers.
|
|
32 |
parent = editor.getParentElement();
|
|
33 |
if ((parent.tagName.toLowerCase() == "span") &&
|
|
34 |
(parent.className.toLowerCase()=="campsite_subhead")) {
|
|
35 |
editor.selectNodeContents(parent);
|
|
36 |
editor.updateToolbar();
|
|
37 |
return false;
|
|
38 |
} else {
|
|
39 |
editor.surroundHTML('<span class="campsite_subhead">', '</span>');
|
|
40 |
}
|
|
41 |
} else {
|
|
42 |
editor.surroundHTML('<span class="campsite_subhead">', '</span>');
|