$key = str_replace('_', '-', $key);
$strlangarray .= '"'.$key.' ": "'.$key.'_ML",';
}
- $strlangarray = substr($strlangarray, 0, -1);
+ $strlangarray = substr($strlangarray, 0, -1);
echo $strlangarray;
?>
};
multiLang = true;
lang = lang.replace(re, '');
}
-
+
// Remove all lang attributes from span tags in selected html.
selectedHTML = selectedHTML.replace(/(<span[^>]*)lang="[^"]*"([^>]*>)/, "$1$2");
selectedHTML = selectedHTML.replace(/(<span[^>]*)class="multilang"([^>]*>)/, "$1$2");
var parentEl = this.getParentElement();
var insertNewSpan = false;
-
+
if (parentEl.nodeName == 'SPAN' && parentEl.getAttribute('lang')) {
// A language was previously defined for the current block.
// Check whether the selected text makes up the whole of the block
}
} else {
parentEl.removeAttribute('lang');
-
+
var classAttr = parentEl.getAttribute('class');
if (classAttr) {
classAttr = classAttr.replace(/multilang/, '').trim();
if (insertNewSpan && lang != '') {
var str = '<span lang="'+lang.trim()+'"';
- if (multiLang) {
str += ' class="multilang"';
- }
str += '>';
str += selectedHTML;
str += '</span>';
case 's': cmd = "strikethrough"; break;
case ',': cmd = "subscript"; break;
case '.': cmd = "superscript"; break;
-
- case 'v':
+
+ case 'v':
if (! HTMLArea.is_gecko ) {
cmd = "paste";
}
break;
-
+
case '0': cmd = "killword"; break;
case 'z': cmd = "undo"; break;
case 'y': cmd = "redo"; break;
break;
} // End switch (key)
-
-
+
+
} else if (ev.ctrlKey && ev.altKey) {
/**
* Ctrl + Alt modifiers.
case 't': cmd = 'inserttable'; break;
case 's': cmd = 'insertsmile'; break;
case 'c': cmd = 'insertchar'; break;
- }
+ }
}
if (cmd) {