Ticket #503: 503_2.patch
File 503_2.patch, 3.3 KB (added by , 15 years ago) |
---|
-
_whatsnew.html
47 47 several "strict warning" messages in Firefox when running FCKeditor.</li> 48 48 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1522">#1522</a>] The ENTER 49 49 key will now work properly in IE with the cursor at the start of a formatted block.</li> 50 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's possible 51 to define in the Styles that a Style (with an empty class) must be shown selected 52 only when no class is present in the current element, and selecting that item will 53 clear the current class (it does apply to any attribute, not only classes).</li> 54 50 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's 51 possible to define in the Styles that a Style (with an empty class) must be shown 52 selected only when no class is present in the current element, and selecting that 53 item will clear the current class (it does apply to any attribute, not only classes).</li> 54 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/503">#503</a>] Orphaned 55 <li> elements now get properly enclosed in a <ul> on output.</li> 55 56 </ul> 56 57 <p> 57 58 <a href="_whatsnew_history.html">See previous versions history</a> -
editor/_source/internals/fck.js
176 176 { 177 177 // Element Node. 178 178 case 1 : 179 if ( !FCKListsLib.BlockElements[ oNode.nodeName.toLowerCase() ] && 179 var nodeName = oNode.nodeName.toLowerCase() ; 180 if ( !FCKListsLib.BlockElements[ nodeName ] && 181 nodeName != 'li' && 180 182 !oNode.getAttribute('_fckfakelement') && 181 183 oNode.getAttribute('_moz_dirty') == null ) 182 184 bMoveNode = true ; -
editor/_source/internals/fckxhtml.js
403 403 return node ; 404 404 }, 405 405 406 // Fix orphaned <li> nodes (Bug #503). 407 li : function( node, htmlNode, targetNode ) 408 { 409 // If the XML parent node is already a <ul> or <ol>, then add the <li> as usual. 410 if ( targetNode.nodeName.IEquals( ['ul', 'ol'] ) ) 411 return FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; 412 413 var newTarget = FCKXHtml.XML.createElement( 'ul' ) ; 414 415 // Reset the _fckxhtmljob so the HTML node is processed again. 416 htmlNode._fckxhtmljob = null ; 417 418 // Loop through all sibling LIs, adding them to the <ul>. 419 do 420 { 421 FCKXHtml._AppendNode( newTarget, htmlNode ) ; 422 423 // Look for the next element following this <li>. 424 do 425 { 426 htmlNode = FCKDomTools.GetNextSibling( htmlNode ) ; 427 } 428 while ( htmlNode && htmlNode.nodeType == 3 && htmlNode.nodeValue.Trim().length == 0 ) 429 } 430 while ( htmlNode && htmlNode.nodeName.toLowerCase() == 'li' ) 431 432 return newTarget ; 433 }, 434 406 435 // Fix nested <ul> and <ol>. 407 436 ol : function( node, htmlNode, targetNode ) 408 437 {