Ticket #1997: 1997_2.patch
File 1997_2.patch, 5.3 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
112 112 as expected.</li> 113 113 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1998">#1998</a>] The native 114 114 XMLHttpRequest class is now used in IE, whenever it is available.</li> 115 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1997">#1997</a>] With 116 IE, the first character of table captions where being lost on table creation.</li> 117 <li>The selection and cursor position was not being properly handled when creating some 118 elements like forms and tables.</li> 115 119 </ul> 116 120 <h3> 117 121 Version 2.6 Beta 1</h3> -
editor/_source/classes/fckdomrange.js
149 149 // is "<p><b><i>^</i></b> Text</p>" (inside <i>). 150 150 MoveToElementEditStart : function( targetElement ) 151 151 { 152 var child;152 var editableElement ; 153 153 154 while ( ( child = targetElement.firstChild ) && child.nodeType == 1 && FCKListsLib.InlineNonEmptyElements[ child.nodeName.toLowerCase() ] ) 155 targetElement = child ; 154 while ( targetElement && targetElement.nodeType == 1 ) 155 { 156 if ( FCKDomTools.CheckIsEditable( targetElement ) ) 157 editableElement = targetElement ; 158 else if ( editableElement ) 159 break ; // If we already found an editable element, stop the loop. 156 160 157 this.MoveToElementStart( targetElement ) ; 161 targetElement = targetElement.firstChild ; 162 } 163 164 if ( editableElement ) 165 this.MoveToElementStart( editableElement ) ; 158 166 }, 159 167 160 168 InsertNode : function( node ) -
editor/_source/internals/fck.js
669 669 range.SplitBlock() ; 670 670 range.InsertNode( element ) ; 671 671 672 var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ] ) ;672 var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ], true ) ; 673 673 674 674 // Be sure that we have something after the new element, so we can move the cursor there. 675 675 if ( !next && FCKConfig.EnterMode != 'br') -
editor/_source/internals/fckdomtools.js
1005 1005 var currentScroll = FCKTools.GetScrollPosition( window ).Y ; 1006 1006 if ( offset > 0 && offset > currentScroll ) 1007 1007 window.scrollTo( 0, offset ) ; 1008 }, 1009 1010 /** 1011 * Check if the element can be edited inside the browser. 1012 */ 1013 CheckIsEditable : function( element ) 1014 { 1015 // Get the element name. 1016 var nodeName = element.nodeName.toLowerCase() ; 1017 1018 // Get the element DTD (defaults to span for unknown elements). 1019 var childDTD = FCK.DTD[ nodeName ] || FCK.DTD.span ; 1020 1021 // In the DTD # == text node. 1022 return ( childDTD['#'] && !FCKListsLib.NonEditableElements[ nodeName ] ) ; 1008 1023 } 1009 1024 } ; -
editor/_source/internals/fcklistslib.js
54 54 // Object elements for the Styles System. 55 55 StyleObjectElements : { img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 }, 56 56 57 // Elements that accept text nodes, but are not possible to edit in the browser. 58 NonEditableElements : { button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 }, 59 57 60 // Elements used to separate block contents. 58 61 BlockBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 }, 59 62 ListBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 } -
editor/dtd/fck_dtd_test.html
17 17 <table border="1"> 18 18 <script type="text/javascript"> 19 19 20 alert(FCK.DTD);21 22 20 for ( var p in FCK.DTD ) 23 21 { 24 22 document.write( '<tr><td><b>' + p + '</b></td><td>' ) ; -
editor/fckdialog.html
681 681 682 682 window.Cancel = function( dontFireChange ) 683 683 { 684 Selection.EnsureSelection() ; 684 685 return CloseDialog( dontFireChange ) ; 685 686 } ; 686 687 … … 688 689 { 689 690 Throbber.Hide() ; 690 691 691 Selection.EnsureSelection() ;692 693 692 // Points the src to a non-existent location to avoid loading errors later, in case the dialog 694 693 // haven't been completed loaded at this point. 695 694 if ( $( 'frmMain' ) )