Changeset 2200
- Timestamp:
- 2008-07-09 07:17:53 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/div_container/editor/_source/internals/fckdomtools.js
r2199 r2200 1041 1041 do 1042 1042 { 1043 if ( currentNode.nodeName.IEquals( 'div' ) && currentNode.firstChild && 1044 FCKListsLib.BlockElements[ currentNode.firstChild.nodeName.toLowerCase() ] ) 1045 { 1043 var child = currentNode.firstChild ; 1044 while ( child && child.nodeType != 1 ) 1045 child = child.nextSibling ; 1046 1047 if ( currentNode.nodeName.IEquals( 'div' ) && child && 1048 FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] ) 1049 { 1050 // This is a block limit node. 1046 1051 currentBlocks.push( currentNode ) ; 1047 1052 if ( currentNode.parentNode.nodeName.IEquals( 'div' ) ) … … 1049 1054 '_fckignorethisnode', true ) ; 1050 1055 } 1056 else 1057 { 1058 // This is not a block limit node. 1059 FCKDomTools.SetElementMarker( elementMarkers, currentNode.parentNode, 1060 '_fckincludethisnode', true ) ; 1061 } 1051 1062 } 1052 1063 while ( ( currentNode = FCKDomTools.GetNextSourceElement( currentNode ) ) && currentNode != endNode … … 1055 1066 for ( var i = currentBlocks.length - 1 ; i >= 0 ; i-- ) 1056 1067 { 1057 if ( currentBlocks[i]['_fckignorethisnode'] )1068 if ( currentBlocks[i]['_fckignorethisnode'] && !currentBlocks[i]['_fckincludethisnode'] ) 1058 1069 currentBlocks.splice( i, 1 ) ; 1059 1070 }