Changeset 103


Ignore:
Timestamp:
05/03/05 11:35:33 (9 years ago)
Author:
niko
Message:

#101: text color highlight doesn't work in mozilla
this is a mozilla-bug: https://bugzilla.mozilla.org/show_bug.cgi?id=279330
this switches useCSS on as a workaround

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r102 r103  
    29982998  this.focusEditor(); 
    29992999  cmdID = cmdID.toLowerCase(); 
    3000   if (HTMLArea.is_gecko) try { this._doc.execCommand('useCSS', false, true); } catch (e) {}; 
     3000  if (HTMLArea.is_gecko) try { this._doc.execCommand('useCSS', false, true); } catch (e) {}; //switch useCSS off (true=off) 
    30013001  switch (cmdID) { 
    3002       case "htmlmode" : this.setMode(); break; 
    3003       case "hilitecolor": 
    3004     (HTMLArea.is_ie) && (cmdID = "backcolor"); 
    3005       case "forecolor": 
    3006     this._popupDialog(editor.config.URIs["select_color"], function(color) { 
    3007       if (color) { // selection not canceled 
    3008         editor._doc.execCommand(cmdID, false, "#" + color); 
    3009       } 
    3010     }, HTMLArea._colorToRgb(this._doc.queryCommandValue(cmdID))); 
    3011     break; 
    3012       case "createlink": 
    3013     this._createLink(); 
    3014     break; 
    3015       case "popupeditor": 
     3002    case "htmlmode" : this.setMode(); break; 
     3003    case "hilitecolor": 
     3004      (HTMLArea.is_ie) && (cmdID = "backcolor");           
     3005      if (HTMLArea.is_gecko) try { editor._doc.execCommand('useCSS', false, false); } catch (e) {};//switch on useCSS (mozilla bug #279330) 
     3006    case "forecolor": 
     3007      this._popupDialog(editor.config.URIs["select_color"], function(color) { 
     3008        if (color) { // selection not canceled 
     3009          editor._doc.execCommand(cmdID, false, "#" + color); 
     3010        } 
     3011      }, HTMLArea._colorToRgb(this._doc.queryCommandValue(cmdID))); 
     3012      break; 
     3013    case "createlink": 
     3014      this._createLink(); 
     3015      break; 
     3016    case "popupeditor": 
    30163017    // this object will be passed to the newly opened window 
    30173018    HTMLArea._object = this; 
Note: See TracChangeset for help on using the changeset viewer.