Salome HOME
Minor fix of the rich text editor for Firefox v12.
authorrkv <rkv@opencascade.com>
Thu, 25 Oct 2012 06:21:55 +0000 (06:21 +0000)
committerrkv <rkv@opencascade.com>
Thu, 25 Oct 2012 06:21:55 +0000 (06:21 +0000)
Workspace/Siman/WebContent/rtef/richtext.js

index ce19f6bb0d55683994fb72bb4e1cb5e69f6d5184..1acd7a9fab570613095b7e22995a407b21b53adf 100644 (file)
@@ -135,7 +135,7 @@ function initTextInput() {
 
     wrapWidth   = 14 * 24;
     defaultFont = "Arial, Helvetica, sans-serif";
-    initRTE("../rtef/images/", "", "", true);
+    initRTE("../rtef/images/", "../rtef/", "", true);
 }
 
 function initTextEditor() {
@@ -158,7 +158,7 @@ function initTextEditor() {
 
     wrapWidth   = 15 * 24;
     defaultFont = "Arial, Helvetica, sans-serif";
-    initRTE("../rtef/images/", "", "", true);
+    initRTE("../rtef/images/", "../rtef/", "", true);
 }
 
 function addCommand(name, action) {
@@ -268,7 +268,7 @@ function writeRichText(rte, html, css, width, height, buttons, readOnly, fullscr
                  document.writeln('<tbody><tr>');
                  insertBar();
                  if(fullscreen || activeCommand.get("save") != null){
-                         document.writeln('<td><input type=image class="rteImg" src="'+imagesPath+'save.gif" alt="'+lblSave+'" title="'+lblSave+'" onmouseover="this.className=\'rteImgUp\'" onmouseout="this.className=\'rteImg\'" onmousedown="this.className=\'rteImgDn\'" onmouseup="this.className=\'rteImgUp\'" onClick="submitEdit()"></td>');
+                         document.writeln('<td><input type="image" class="rteImg" src="'+imagesPath+'save.gif" alt="'+lblSave+'" title="'+lblSave+'" onmouseover="this.className=\'rteImgUp\'" onmouseout="this.className=\'rteImg\'" onmousedown="this.className=\'rteImgDn\'" onmouseup="this.className=\'rteImgUp\'" onClick="submitEdit()"></td>');
                          nbcommand += 1;
                  }
                  if(!isSafari && !isKonqueror) {
@@ -467,6 +467,7 @@ function enableDesignMode(rte, html, css, readOnly) {
                        //
                        // if(!readOnly) document.getElementById(rte).contentDocument.designMode = "on";
                        if(!readOnly && !isKonqueror && !isSafari) {
+                document.getElementById(rte).contentDocument.designMode = "on"; //RKV
                                addLoadEvent(function() { document.getElementById(rte).contentDocument.designMode = "on"; });
                        } else if(!readOnly) {
                                if (!readOnly) document.getElementById(rte).contentDocument.designMode = "on";