- doOnLoad(<% $onload |n %>);
-% }
-
-% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
- function ReplaceAllTextareas() {
- var sAgent = navigator.userAgent.toLowerCase();
- if (!FCKeditor_IsCompatibleBrowser() ||
- sAgent.indexOf('iphone') != -1 ||
- sAgent.indexOf('android') != -1 )
- return false;
-
- // replace all content and signature message boxes
- var allTextAreas = document.getElementsByTagName("textarea");
-
- for (var i=0; i < allTextAreas.length; i++) {
- var textArea = allTextAreas[i];
- if ( (textArea.getAttribute('class') == 'messagebox')
- || (textArea.getAttribute('className') == 'messagebox')) {
- // Turn the original plain text content into HTML
-
-%# Special case - when we re-edit a textarea, don't re-encode it
-% if (!$m->request_args->{'FCKeditorEncoded'}) {
- textArea.value = textArea.value.replace(
- /&/g, "&"
- ).replace(
- /</g, "<"
- ).replace(
- />/g, ">"
- ).replace(
- /\n/g, "\n<br />"
- );