Changeset 962 for trunk/modules/Gecko


Ignore:
Timestamp:
02/04/08 00:43:21 (12 years ago)
Author:
ray
Message:
  • #1149 [Safari] retain editing position doesn't work
  • #1148 HTML entities break when cursor is inside when switching from HTML to WYSIWYG
  • #1147 getSelectedHTML() throws error when nothing is selected
  • #1146 [ExtendedFileManager?] IE6 doesn't show images
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/Gecko/Gecko.js

    r957 r962  
    189189/*  This is now handled by a plugin   
    190190    case 13: // ENTER 
    191       if( !ev.shiftKey && editor.config.mozParaHandler == 'dirty' ) 
    192       { 
    193         this.dom_checkInsertP(); 
    194         Xinha._stopEvent(ev); 
    195       } 
     191 
    196192    break;*/ 
    197193 
     
    620616{ 
    621617  var sel = this.getSelection(); 
     618  if (sel.isCollapsed) return ''; 
    622619  var range = this.createRange(sel); 
    623620  return Xinha.getHTML(range.cloneContents(), false, this); 
     
    710707      var after = ta.value.substring( index, ta.value.length ); 
    711708 
    712       if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, and inside the body) 
     709      if ( after.match(/^[^<]*>/) ) // make sure cursor is in an editable area (outside tags, script blocks, entities, and inside the body) 
    713710      { 
    714711        var tagEnd = after.indexOf(">") + 1; 
     
    716713      } 
    717714      else ta.value = before + cc + after; 
     715      ta.value = ta.value.replace(new RegExp ('(&[^'+cc+']*?)('+cc+')([^'+cc+']*?;)'), "$1$3$2"); 
    718716      ta.value = ta.value.replace(new RegExp ('(<script[^>]*>[^'+cc+']*?)('+cc+')([^'+cc+']*?<\/script>)'), "$1$3$2"); 
    719717      ta.value = ta.value.replace(new RegExp ('^([^'+cc+']*)('+cc+')([^'+cc+']*<body[^>]*>)(.*?)'), "$1$3$2$4"); 
Note: See TracChangeset for help on using the changeset viewer.