Changeset 826
- Timestamp:
- 09/15/07 13:50:06 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckdomrangeiterator.js
r822 r826 37 37 */ 38 38 this.ForceBrBreak = false ; 39 39 40 40 /** 41 41 * Guarantees that the iterator will always return "real" block elements. … … 64 64 // The block element to be returned. 65 65 var block ; 66 66 67 67 // The range object used to identify the paragraph contents. 68 68 var range ; 69 69 70 70 // Indicated that the current element in the loop is the last one. 71 71 var isLast ; 72 72 73 73 // Instructs to cleanup remaining BRs. 74 74 var removePreviousBr ; … … 161 161 } 162 162 163 // The last node has been found. 163 // The last node has been found. 164 164 isLast = ( currentNode == lastNode ) ; 165 165 … … 178 178 179 179 currentNode = parentNode ; 180 isLast = ( currentNode == lastNode ) ; 180 181 continueFromSibling = true ; 181 182 } … … 230 231 // Insert the fixed block into the DOM. 231 232 range.InsertNode( block ) ; 232 233 233 234 removePreviousBr = true ; 234 removeLastBr = true ; 235 removeLastBr = true ; 235 236 } 236 237 else if ( block.nodeName.toLowerCase() != 'li' ) … … 251 252 // right position for our intents. 252 253 var splitInfo = range.SplitBlock() ; 253 254 254 255 removePreviousBr = !splitInfo.WasStartOfBlock ; 255 256 removeLastBr = !splitInfo.WasEndOfBlock ; … … 265 266 // the current range, which could be an <li> child (nested 266 267 // lists) or the next sibling <li>. 267 268 268 269 this._NextNode = FCKDomTools.GetNextSourceNode( range.EndNode, true ) ; 269 270 return block ; … … 277 278 previousSibling.parentNode.removeChild( previousSibling ) ; 278 279 } 279 280 280 281 if ( removeLastBr ) 281 282 { … … 284 285 block.removeChild( lastChild ) ; 285 286 } 286 287 287 288 // Get a reference for the next element. This is important because the 288 289 // above block can be removed or changed, so we can rely on it for the
Note: See TracChangeset
for help on using the changeset viewer.
