Changeset 804
- Timestamp:
- 2007-09-12 11:12:57 (15 months ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 1 added
- 6 modified
-
editor/fckeditor.html (modified) (1 diff)
-
editor/_source/commandclasses/fckjustifycommands.js (added)
-
editor/_source/internals/fckcommands.js (modified) (1 diff)
-
fckpackager.xml (modified) (2 diffs)
-
_test/automated/tests/fckdomrange.html (modified) (3 diffs)
-
_test/manual/fckdomrange/test1.html (modified) (4 diffs)
-
_test/manual/fckdomrange/test1_inner.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/fckeditor.html
r793 r804 117 117 LoadScript( '_source/commandclasses/fckfitwindow.js' ) ; 118 118 LoadScript( '_source/commandclasses/fcklistcommands.js' ) ; 119 LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ; 119 120 LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ; 120 121 LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ; -
FCKeditor/trunk/editor/_source/internals/fckcommands.js
r774 r804 89 89 case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ; 90 90 91 case 'JustifyLeft' : oCommand = new FCKJustifyCommand( 'left' ) ; break ; 92 case 'JustifyCenter' : oCommand = new FCKJustifyCommand( 'center' ) ; break ; 93 case 'JustifyRight' : oCommand = new FCKJustifyCommand( 'right' ) ; break ; 94 case 'JustifyFull' : oCommand = new FCKJustifyCommand( 'justify' ) ; break ; 95 91 96 case 'TableInsertRowAfter' : oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ; 92 97 case 'TableInsertRowBefore' : oCommand = new FCKTableCommand('TableInsertRowBefore') ; break ; -
FCKeditor/trunk/fckpackager.xml
r774 r804 127 127 <File path="editor/_source/commandclasses/fckfitwindow.js" /> 128 128 <File path="editor/_source/commandclasses/fcklistcommands.js" /> 129 <File path="editor/_source/commandclasses/fckjustifycommands.js" /> 129 130 <File path="editor/_source/commandclasses/fckcorestylecommand.js" /> 130 131 <File path="editor/_source/commandclasses/fckremoveformatcommand.js" /> … … 218 219 <File path="editor/_source/commandclasses/fckfitwindow.js" /> 219 220 <File path="editor/_source/commandclasses/fcklistcommands.js" /> 221 <File path="editor/_source/commandclasses/fckjustifycommands.js" /> 220 222 <File path="editor/_source/commandclasses/fckcorestylecommand.js" /> 221 223 <File path="editor/_source/commandclasses/fckremoveformatcommand.js" /> -
FCKeditor/trunk/_test/automated/tests/fckdomrange.html
r132 r804 28 28 <script type="text/javascript"> 29 29 30 var FCKConfig = { EnterMode : 'p' } ; 31 30 32 FCKScriptLoader.Load( 'FCKDomRange' ) ; 31 33 … … 529 531 if ( docFrag.AppendTo ) docFrag.AppendTo( tmpDiv ) ; else tmpDiv.appendChild( docFrag ) ; 530 532 531 assertEquals( 'Range HTML', 'this text has no block tag. it should be corrected when working with the enter key set to p or div tags. the <strong id=_strongnopara>br configuration</strong> should not make changes instead.', GetTestInnerHtml( tmpDiv ) ) ;533 assertEquals( 'Range HTML', 'this text has no block tag.<br>it should be corrected when working with the enter key set to p or div tags. the <strong id=_strongnopara>br configuration</strong> should not make changes instead.<br>it has three lines separated by br tags.', GetTestInnerHtml( tmpDiv ) ) ; 532 534 } 533 535 … … 613 615 alt="" /> 614 616 </p> 615 This text has no block tag. It should be corrected when working with the enter key617 This text has no block tag.<br />It should be corrected when working with the enter key 616 618 set to "p" or "div" tags. The <strong id="_StrongNoPara">"br" configuration</strong> 617 should not make changes instead. 619 should not make changes instead.<br />It has three lines separated by BR tags. 618 620 <p> 619 621 In the test we will try to recreate this document using the editor tools. To make -
FCKeditor/trunk/_test/manual/fckdomrange/test1.html
r774 r804 37 37 FCKConfig.Debug = false ; 38 38 FCKConfig.BasePath = '../../../editor/' ; 39 FCKConfig.EnterMode = 'br' ; 40 41 FCKListsLib.Setup() ; 39 42 40 43 var oRange ; … … 56 59 document.getElementById('xEndNode').innerHTML = ( oRange.EndNode ? oRange.EndNode.nodeType == 1 ? oRange.EndNode.tagName : '[text]' : 'null' ) ; 57 60 58 document.getElementById('xStartNode').title = oRange.StartNode.nodeType == 1? '' : oRange.StartNode.nodeValue ;59 document.getElementById('xEndNode').title = oRange.EndNode.nodeType == 1? '' : oRange.EndNode.nodeValue ;61 document.getElementById('xStartNode').title = ( !oRange.StartNode || oRange.StartNode.nodeType == 1 ) ? '' : oRange.StartNode.nodeValue ; 62 document.getElementById('xEndNode').title = ( !oRange.EndNode || oRange.EndNode.nodeType == 1 ) ? '' : oRange.EndNode.nodeValue ; 60 63 } 61 64 … … 169 172 UpdateDetails() ; 170 173 oRange.Window.focus() ; 174 } 175 176 function GetParagraphs() 177 { 178 var paragraphs = oRange.GetParagraphs() ; 179 180 var msg = '' ; 181 182 var div = oRange.Window.document.createElement( 'div' ) ; 183 184 // To avoid breaking ranges, we should process it in reverse order. 185 for ( var i = paragraphs.length - 1 ; i >= 0 ; i-- ) 186 { 187 div.innerHTML = '' ; 188 paragraphs[i].ExtractContents().AppendTo( div ) ; 189 msg = div.innerHTML + '\n---\n' + msg ; 190 } 191 192 msg = 'Number of ranges: ' + paragraphs.length + '\n---\n' + msg ; 193 194 alert( msg ) ; 171 195 } 172 196 … … 223 247 <input type="button" value="Check Is Collapsed" onclick="CheckIsCollapsed(); return false;" /> 224 248 <input type="button" value="Check Is Empty" onclick="CheckIsEmpty(); return false;" /> 249 <input type="button" value="Get Paragraphs" onclick="GetParagraphs(); return false;" /> 225 250 </p> 226 251 <table> -
FCKeditor/trunk/_test/manual/fckdomrange/test1_inner.html
r132 r804 86 86 alt="" /> 87 87 </p> 88 This text has no block tag. It should be corrected when working with the enter key 88 This text has no block tag.<br /> 89 It should be corrected when working with the enter key 89 90 set to "p" or "div" tags. The <strong>"br" configuration</strong> should not make 90 changes instead. 91 changes instead.<br /> 92 It has three lines separated by BR. 91 93 <p> 92 94 In the test we will try to recreate this document using the editor tools. To make