Changeset 1803
- Timestamp:
- 2008-03-26 08:48:46 (2 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 7 modified
-
editor/dtd/fck_dtd_test.html (modified) (1 diff)
-
editor/fckdialog.html (modified) (2 diffs)
-
editor/_source/classes/fckdomrange.js (modified) (1 diff)
-
editor/_source/internals/fckdomtools.js (modified) (1 diff)
-
editor/_source/internals/fck.js (modified) (1 diff)
-
editor/_source/internals/fcklistslib.js (modified) (1 diff)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/dtd/fck_dtd_test.html
r911 r1803 17 17 <table border="1"> 18 18 <script type="text/javascript"> 19 20 alert(FCK.DTD);21 19 22 20 for ( var p in FCK.DTD ) -
FCKeditor/trunk/editor/fckdialog.html
r1795 r1803 673 673 window.Cancel = function( dontFireChange ) 674 674 { 675 Selection.EnsureSelection() ; 675 676 return CloseDialog( dontFireChange ) ; 676 677 } ; … … 679 680 { 680 681 Throbber.Hide() ; 681 682 Selection.EnsureSelection() ;683 682 684 683 // Points the src to a non-existent location to avoid loading errors later, in case the dialog -
FCKeditor/trunk/editor/_source/classes/fckdomrange.js
r1729 r1803 150 150 MoveToElementEditStart : function( targetElement ) 151 151 { 152 var child ; 153 154 while ( ( child = targetElement.firstChild ) && child.nodeType == 1 && FCKListsLib.InlineNonEmptyElements[ child.nodeName.toLowerCase() ] ) 155 targetElement = child ; 156 157 this.MoveToElementStart( targetElement ) ; 152 var editableElement ; 153 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. 160 161 targetElement = targetElement.firstChild ; 162 } 163 164 if ( editableElement ) 165 this.MoveToElementStart( editableElement ) ; 158 166 }, 159 167 -
FCKeditor/trunk/editor/_source/internals/fckdomtools.js
r1693 r1803 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 } ; -
FCKeditor/trunk/editor/_source/internals/fck.js
r1795 r1803 672 672 range.InsertNode( element ) ; 673 673 674 var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ] ) ;674 var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ], true ) ; 675 675 676 676 // Be sure that we have something after the new element, so we can move the cursor there. -
FCKeditor/trunk/editor/_source/internals/fcklistslib.js
r1565 r1803 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 }, -
FCKeditor/trunk/_whatsnew.html
r1798 r1803 139 139 dialogs using API calls which deals with the selection, like InsertHtml now can 140 140 be sure the selection will be placed in the correct position.</li> 141 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1997">#1997</a>] With 142 IE, the first character of table captions where being lost on table creation.</li> 143 <li>The selection and cursor position was not being properly handled when creating some 144 elements like forms and tables.</li> 141 145 </ul> 142 146 <h3>