Changeset 6898
- Timestamp:
- 05/09/11 15:45:31 (2 years ago)
- Location:
- CKEditor/branches/versions/3.5.x
- Files:
-
- 37 edited
-
. (modified) (1 prop)
-
CHANGES.html (modified) (1 diff, 1 prop)
-
_dev/releaser/release.bat (modified) (1 diff)
-
_dev/releaser/release.sh (modified) (1 diff)
-
_samples/asp/index.html (modified) (1 diff)
-
_samples/assets/_posteddata.php (modified) (1 diff)
-
_samples/php/index.html (modified) (1 diff)
-
_samples/placeholder.html (modified) (2 diffs)
-
_source/core/ckeditor_base.js (modified) (1 diff)
-
_source/core/dom/walker.js (modified) (1 diff)
-
_source/core/dtd.js (modified) (1 diff)
-
_source/core/editor.js (modified) (1 diff)
-
_source/core/htmlparser.js (modified) (1 diff)
-
_source/core/htmlparser/fragment.js (modified) (1 diff)
-
_source/core/plugindefinition.js (modified) (1 diff)
-
_source/core/plugins.js (modified) (1 diff)
-
_source/lang/_translationstatus.txt (modified) (1 diff)
-
_source/lang/sk.js (modified) (18 diffs)
-
_source/plugins/button/plugin.js (modified) (1 diff)
-
_source/plugins/clipboard/dialogs/paste.js (modified) (3 diffs)
-
_source/plugins/clipboard/plugin.js (modified) (3 diffs)
-
_source/plugins/colorbutton/plugin.js (modified) (4 diffs)
-
_source/plugins/colordialog/plugin.js (modified) (1 diff)
-
_source/plugins/dialog/dialogDefinition.js (modified) (1 diff)
-
_source/plugins/dialog/plugin.js (modified) (7 diffs)
-
_source/plugins/entities/plugin.js (modified) (5 diffs)
-
_source/plugins/indent/plugin.js (modified) (1 diff)
-
_source/plugins/justify/plugin.js (modified) (1 diff)
-
_source/plugins/pastefromword/plugin.js (modified) (3 diffs)
-
_source/plugins/pastetext/dialogs/pastetext.js (modified) (2 diffs)
-
_source/plugins/pastetext/plugin.js (modified) (3 diffs)
-
_source/plugins/scayt/plugin.js (modified) (1 diff)
-
_source/plugins/selection/plugin.js (modified) (1 diff)
-
_source/plugins/styles/plugin.js (modified) (3 diffs)
-
_source/plugins/undo/plugin.js (modified) (1 diff)
-
_source/plugins/wysiwygarea/plugin.js (modified) (6 diffs)
-
_source/themes/default/theme.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/versions/3.5.x
-
CKEditor/branches/versions/3.5.x/CHANGES.html
- Property svn:mergeinfo changed
/CKEditor/trunk/CHANGES.html merged: 6657,6676,6678,6698,6723,6740,6761,6793,6799,6813,6815,6817-6818,6825,6876,6881,6885,6896
r6656 r6898 35 35 CKEditor Changelog 36 36 </h1> 37 <h3> 38 CKEditor 3.5.4 (SVN)</h3> 39 <p> 40 New features:</p> 41 <ul> 42 <li></li> 43 </ul> 44 <p> 45 Fixed issues:</p> 46 <ul> 47 <li>Added protection against XSS attacks in PHP samples when displaying element names.</li> 48 <li><a href="http://dev.ckeditor.com/ticket/7347">#7347</a> : The <em>Enter</em> key will no longer be caught by the dialog window covering the editor.</li> 49 <li><a href="http://dev.ckeditor.com/ticket/6718">#6718</a> : Paste from Word command overrides the Force Paste as Plain Text configuration.</li> 50 <li><a href="http://dev.ckeditor.com/ticket/6629">#6629</a> : Padding body is no longer needed when the last block is pre-formatted.</li> 51 <li><a href="http://dev.ckeditor.com/ticket/4844">#4844</a> : [IE] Dialog windows fail to load if there are too many editor instances on the page.</li> 52 <li><a href="http://dev.ckeditor.com/ticket/5788">#5788</a> : HTML parser trims empty spaces following <code><br></code> elements.</li> 53 <li><a href="http://dev.ckeditor.com/ticket/7513">#7513</a> : Invalid markup could cause the editor to hang.</li> 54 <li><a href="http://dev.ckeditor.com/ticket/6109">#6109</a> : Paste and Paste as Plain Text dialog windows now use the standard <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#commitContent">commitContent</a></code> and <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#setupContent">setupContent</a></code> methods.</li> 55 <li><a href="http://dev.ckeditor.com/ticket/7588">#7588</a> : The editor code now has a protection system to avoid issues when including <code>ckeditor.js</code> more than once in the page.</li> 56 <li><a href="http://dev.ckeditor.com/ticket/7322">#7322</a> : Text font plugin now recognizes font family names that contain quotes.</li> 57 <li><a href="http://dev.ckeditor.com/ticket/7540">#7540</a> : Paste from Word introduces wrong spaces.</li> 58 <li><a href="http://dev.ckeditor.com/ticket/7697">#7697</a> : Successive calls of the <code>replace()</code> method did not work after SCAYT context menu initialization.</li> 59 <li>Updated the following language files:<ul> 60 <li><a href="http://dev.ckeditor.com/ticket/7647">#7647</a> : Slovak;</li> 61 </ul></li> 62 </ul> 37 63 <h3> 38 64 CKEditor 3.5.3</h3> - Property svn:mergeinfo changed
-
CKEditor/branches/versions/3.5.x/_dev/releaser/release.bat
r6656 r6898 11 11 :: rmdir /S /Q release 12 12 13 java -jar ckreleaser/ckreleaser.jar ckreleaser.release ../.. release "3.5. 3" ckeditor_3.5.3--run-before-release=langtool.bat13 java -jar ckreleaser/ckreleaser.jar ckreleaser.release ../.. release "3.5.4 (SVN)" ckeditor_3.5.4_svn --run-before-release=langtool.bat -
CKEditor/branches/versions/3.5.x/_dev/releaser/release.sh
r6656 r6898 13 13 14 14 pushd $DIR 15 java -jar ckreleaser/ckreleaser.jar ckreleaser.release ../.. release "3.5. 3" ckeditor_3.5.3--run-before-release=$LANGTOOL15 java -jar ckreleaser/ckreleaser.jar ckreleaser.release ../.. release "3.5.4 (SVN)" ckeditor_3.5.4_svn --run-before-release=$LANGTOOL 16 16 popd -
CKEditor/branches/versions/3.5.x/_samples/asp/index.html
r6396 r6898 81 81 <ul class="samples"> 82 82 <li><a class="samples" href="replace.asp">Replace existing textareas by code</a></li> 83 <li><a class="samples" href="replace All.asp">Replace all textareas by code</a></li>83 <li><a class="samples" href="replaceall.asp">Replace all textareas by code</a></li> 84 84 <li><a class="samples" href="standalone.asp">Create instances in asp</a></li> 85 85 </ul> -
CKEditor/branches/versions/3.5.x/_samples/assets/_posteddata.php
r6396 r6898 40 40 ?> 41 41 <tr> 42 <th style="vertical-align: top"><?php echo $sForm?></th>42 <th style="vertical-align: top"><?php echo htmlspecialchars($sForm); ?></th> 43 43 <td><pre class="samples"><?php echo $postedValue?></pre></td> 44 44 </tr> -
CKEditor/branches/versions/3.5.x/_samples/php/index.html
r6396 r6898 20 20 <li><a class="samples" href="replace.php">Replace existing textarea elements by code</a><br /> 21 21 Replacement of selected textarea elements with CKEditor instances by using a JavaScript call.</li> 22 <li><a class="samples" href="replace All.php">Replace all textarea elements by code</a><br />22 <li><a class="samples" href="replaceall.php">Replace all textarea elements by code</a><br /> 23 23 Replacement of all textarea elements with CKEditor instances by using a JavaScript call.</li> 24 24 <li><a class="samples" href="standalone.php">Create CKEditor instances in PHP</a><br /> -
CKEditor/branches/versions/3.5.x/_samples/placeholder.html
r6396 r6898 23 23 <p> 24 24 This sample shows how to configure CKEditor instances to use the 25 <strong> placeholder</strong> plugin that lets you insert read-only elements25 <strong>Placeholder</strong> plugin that lets you insert read-only elements 26 26 into your content. To enter and modify read-only text, use the 27 27 <strong>Create Placeholder</strong> button and its matching dialog window. 28 28 </p> 29 29 <p> 30 To add a CKEditor instance that uses the < strong>placeholder</strong> plugin and a related30 To add a CKEditor instance that uses the <code>placeholder</code> plugin and a related 31 31 <strong>Create Placeholder</strong> toolbar button, insert the following JavaScript 32 32 call to your code: … … 55 55 <p> 56 56 <label for="editor1"> 57 CKEditor using the < strong>placeholder</strong> plugin with its default configuration:</label>57 CKEditor using the <code>placeholder</code> plugin with its default configuration:</label> 58 58 <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is a [[sample placeholder]]. You are using <a href="http://ckeditor.com/">CKEditor</a>. </p></textarea> 59 59 <script type="text/javascript"> -
CKEditor/branches/versions/3.5.x/_source/core/ckeditor_base.js
r6655 r6898 17 17 // #### Raw code 18 18 // ATTENTION: read the above "Compressed Code" notes when changing this code. 19 20 /* @Packager.RemoveLine 21 // Avoid having the editor code initialized twice. (#7588) 22 // Use CKEDITOR.dom to check whether the full ckeditor.js code has been loaded 23 // or just ckeditor_basic.js. 24 // Remove these lines when compressing manually. 25 if ( window.CKEDITOR && window.CKEDITOR.dom ) 26 return; 27 @Packager.RemoveLine */ 19 28 20 29 if ( !window.CKEDITOR ) -
CKEditor/branches/versions/3.5.x/_source/core/dom/walker.js
r6396 r6898 339 339 CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) 340 340 { 341 var nodeNameMatches = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ); 341 var nodeNameMatches = customNodeNames ? 342 CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ) : 343 CKEDITOR.dtd.$block; 342 344 343 345 // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297) -
CKEditor/branches/versions/3.5.x/_source/core/dtd.js
r6396 r6898 182 182 table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}, 183 183 code : L, 184 script : N,185 184 tfoot : M, 186 185 cite : L, -
CKEditor/branches/versions/3.5.x/_source/core/editor.js
r6655 r6898 562 562 * executed, otherwise "false". 563 563 * @example 564 * editorInstance.execCommand( ' Bold' );564 * editorInstance.execCommand( 'bold' ); 565 565 */ 566 566 execCommand : function( commandName, data ) -
CKEditor/branches/versions/3.5.x/_source/core/htmlparser.js
r6396 r6898 19 19 this._ = 20 20 { 21 htmlPartsRegex : new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?: [^"\'>]+)|(?:"[^"]*")|(?:\'[^\']*\'))*)\\/?>))', 'g' )21 htmlPartsRegex : new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:"[^"]*")|(?:\'[^\']*\')|[^"\'>])*)\\/?>))', 'g' ) 22 22 }; 23 23 }; -
CKEditor/branches/versions/3.5.x/_source/core/htmlparser/fragment.js
r6655 r6898 361 361 parser.onText = function( text ) 362 362 { 363 // Trim empty spaces at beginning of element contents except <pre>.364 if ( !currentNode._.hasInlineStarted&& !inPre )363 // Trim empty spaces at beginning of text contents except <pre>. 364 if ( ( !currentNode._.hasInlineStarted || pendingBRs.length ) && !inPre ) 365 365 { 366 366 text = CKEDITOR.tools.ltrim( text ); -
CKEditor/branches/versions/3.5.x/_source/core/plugindefinition.js
r6396 r6898 28 28 * { 29 29 * requires : [ 'button', 'selection' ] 30 * }); 31 */ 32 33 /** 34 * A list of language files available for this plugin. These files are stored inside 35 * the "lang" directory, which is inside the plugin directory, follow the name 36 * pattern of "langCode.js", and contain a language definition created with {@link CKEDITOR.pluginDefinition#setLang}. 37 * While the plugin is being loaded, the editor checks this list to see if 38 * a language file of the current editor language ({@link CKEDITOR.editor#langCode}) 39 * is available, and if so, loads it. Otherwise, the file represented by the first list item 40 * in the list is loaded. 41 * @name CKEDITOR.pluginDefinition.prototype.lang 42 * @type Array 43 * @example 44 * CKEDITOR.plugins.add( 'sample', 45 * { 46 * lang : [ 'en', 'fr' ] 30 47 * }); 31 48 */ -
CKEditor/branches/versions/3.5.x/_source/core/plugins.js
r6655 r6898 77 77 }); 78 78 79 /** 80 * Loads a specific language file, or auto detect it. A callback is 81 * then called when the file gets loaded. 82 * @param {String} pluginName The name of the plugin to which the provided translation 83 * should be attached. 84 * @param {String} languageCode The code of the language translation provided. 85 * @param {Object} languageEntries An object that contains pairs of label and 86 * the respective translation. 87 * @example 88 * CKEDITOR.plugins.setLang( 'myPlugin', 'en', { 89 * title : 'My plugin', 90 * selectOption : 'Please select an option' 91 * } ); 92 */ 79 93 CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries ) 80 94 { -
CKEditor/branches/versions/3.5.x/_source/lang/_translationstatus.txt
r6655 r6898 48 48 ro.js Found: 289 Missing: 233 49 49 ru.js Found: 451 Missing: 71 50 sk.js Found: 290 Missing: 23250 sk.js Found: 334 Missing: 188 51 51 sl.js Found: 394 Missing: 128 52 52 sr-latn.js Found: 264 Missing: 258 -
CKEditor/branches/versions/3.5.x/_source/lang/sk.js
r6655 r6898 32 32 * of reading non-English words. So be careful while translating it. 33 33 */ 34 editorTitle : 'Rich text editor, %1, press ALT 0 for help.', // MISSING34 editorTitle : 'Rich text editor, %1, stlačte ALT 0 pre nápovedu.', 35 35 36 36 // ARIA descriptions. … … 57 57 horizontalrule : 'Vložiť vodorovnú čiaru', 58 58 pagebreak : 'Vložiť oddeľovač stránky', 59 pagebreakAlt : ' Page Break', // MISSING59 pagebreakAlt : 'Zalomenie strany', 60 60 unlink : 'Odstrániť odkaz', 61 61 undo : 'Späť', … … 94 94 ok : 'OK', 95 95 cancel : 'Zrušiť', 96 close : ' Close', // MISSING97 preview : ' Preview', // MISSING96 close : 'Zatvorit', 97 preview : 'Náhľad', 98 98 generalTab : 'Hlavné', 99 99 advancedTab : 'Rozšírené', 100 validateNumberFailed : ' This value is not a number.', // MISSING101 confirmNewPage : ' Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING102 confirmCancel : ' Some of the options have been changed. Are you sure to close the dialog?', // MISSING100 validateNumberFailed : 'Hodnota nieje číslo.', 101 confirmNewPage : 'Prajete si načítat novú stránku? Všetky neuložené zmeny budú stratené. ', 102 confirmCancel : 'Niektore možnosti boli zmenené. Naozaj chcete zavrieť okno?', 103 103 options : 'Options', // MISSING 104 104 target : 'Target', // MISSING … … 120 120 alignMiddle : 'Na stred', 121 121 alignBottom : 'Dole', 122 invalidHeight : ' Height must be a number.', // MISSING123 invalidWidth : ' Width must be a number.', // MISSING122 invalidHeight : 'Výška musí byť číslo.', 123 invalidWidth : 'Šírka musí byť číslo.', 124 124 125 125 // Put the voice-only part of the label in the span. … … 137 137 toolbar : 'Vložiť špeciálne znaky', 138 138 title : 'Výber špeciálneho znaku', 139 options : ' Special Character Options' // MISSING139 options : 'Možnosti špecíalneho znaku' 140 140 }, 141 141 … … 160 160 targetPopupName : 'Názov vyskakovacieho okna', 161 161 popupFeatures : 'Vlastnosti vyskakovacieho okna', 162 popupResizable : ' Resizable', // MISSING162 popupResizable : 'Meniteľná veľkosť', 163 163 popupStatusBar : 'Stavový riadok', 164 164 popupLocationBar: 'Panel umiestnenia', … … 208 208 list: 209 209 { 210 numberedTitle : ' Numbered List Properties', // MISSING210 numberedTitle : 'Vlastnosti číselného zoznamu', 211 211 bulletedTitle : 'Bulleted List Properties', // MISSING 212 type : ' Type', // MISSING213 start : ' Start', // MISSING214 validateStartNumber :' List start number must be a whole number.', // MISSING212 type : 'Druh', 213 start : 'Začiatok', 214 validateStartNumber :'Začiatočné číslo číselného zoznamu musí byť celé číslo.', 215 215 circle : 'Circle', // MISSING 216 216 disc : 'Disc', // MISSING … … 242 242 matchCyclic : 'Match cyclic', // MISSING 243 243 replaceAll : 'Nahradiť všetko', 244 replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING244 replaceSuccessMsg : '%1 výskyt(ov) nahradených.' 245 245 }, 246 246 … … 262 262 caption : 'Popis', 263 263 summary : 'Prehľad', 264 headers : 'H eaders', // MISSING265 headersNone : ' None', // MISSING266 headersColumn : ' First column', // MISSING267 headersRow : ' First Row', // MISSING268 headersBoth : ' Both', // MISSING269 invalidRows : ' Number of rows must be a number greater than 0.', // MISSING270 invalidCols : ' Number of columns must be a number greater than 0.', // MISSING271 invalidBorder : ' Border size must be a number.', // MISSING272 invalidWidth : ' Table width must be a number.', // MISSING273 invalidHeight : ' Table height must be a number.', // MISSING274 invalidCellSpacing : ' Cell spacing must be a number.', // MISSING275 invalidCellPadding : ' Cell padding must be a number.', // MISSING264 headers : 'Hlavička', 265 headersNone : 'Žiadne', 266 headersColumn : 'Prvý stĺpec', 267 headersRow : 'Prvý riadok', 268 headersBoth : 'Obe', 269 invalidRows : 'Počet riadkov musí byť číslo väčšie ako 0.', 270 invalidCols : 'Počet stĺpcov musí byť číslo väčšie ako 0.', 271 invalidBorder : 'Širka rámu musí byť celé číslo.', 272 invalidWidth : 'Širka tabuľky musí byť číslo.', 273 invalidHeight : 'Výška tabuľky musí byť číslo.', 274 invalidCellSpacing : 'Medzera mädzi bunkami (spacing) musí byť číslo.', 275 invalidCellPadding : 'Odsadenie v bunkách (padding) musí byť číslo.', 276 276 277 277 cell : … … 351 351 action : 'Akcie', 352 352 method : 'Metóda', 353 encoding : ' Encoding' // MISSING353 encoding : 'Kódovanie' 354 354 }, 355 355 … … 476 476 toolbar : 'Kontrola pravopisu', 477 477 title : 'Spell Check', // MISSING 478 notAvailable : 'S orry, but service is unavailable now.', // MISSING479 errorLoading : ' Error loading application service host: %s.', // MISSING478 notAvailable : 'Služba práve nieje dostupná.', 479 errorLoading : 'Chyba pri načítaní slovníka z adresy: %s.', 480 480 notInDic : 'Nie je v slovníku', 481 481 changeTo : 'Zmeniť na', … … 498 498 toolbar : 'Smajlíky', 499 499 title : 'Vkladanie smajlíkov', 500 options : ' Smiley Options' // MISSING500 options : 'Možnosti smajlíkov' 501 501 }, 502 502 … … 529 529 pasteMsg : 'Prosím vložte nasledovný rámček použitím klávesnice (<STRONG>Ctrl/Cmd+V</STRONG>) a stlačte <STRONG>OK</STRONG>.', 530 530 securityMsg : 'Bezpečnostné nastavenia Vášho prehliadača nedovoľujú editoru pristupovať priamo k datám v schránke. Musíte ich vložiť znovu do tohto okna.', 531 pasteArea : ' Paste Area' // MISSING531 pasteArea : 'Vložiť pole' 532 532 }, 533 533 534 534 pastefromword : 535 535 { 536 confirmCleanup : ' The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING536 confirmCleanup : 'Vkladaný text vyzerá byť skopírovaný z Wordu. Chcete ho automaticky vyčistiť pred vkladaním?', 537 537 toolbar : 'Vložiť z Wordu', 538 538 title : 'Vložiť z Wordu', 539 error : ' It was not possible to clean up the pasted data due to an internal error' // MISSING539 error : 'Nastala chyba pri čistení údajov. Nie je možné vyčistiť vložené údaje.' 540 540 }, 541 541 … … 550 550 button : 'Šablóny', 551 551 title : 'Šablóny obsahu', 552 options : ' Template Options', // MISSING552 options : 'Vlastnosti šablóny', 553 553 insertOption : 'Nahradiť aktuálny obsah', 554 554 selectPromptMsg : 'Prosím vyberte šablóny na otvorenie v editore<br>(súšasný obsah bude stratený):', … … 603 603 iframe : 604 604 { 605 title : 'IFrame Properties', // MISSING605 title : 'IFrame - vlastnosti', 606 606 toolbar : 'IFrame', // MISSING 607 noUrl : ' Please type the iframe URL', // MISSING608 scrolling : ' Enable scrollbars', // MISSING609 border : ' Show frame border' // MISSING607 noUrl : 'Vložte URL pre iframe', 608 scrolling : 'Povoliť skrolovanie', 609 border : 'Zobraziť orámovanie' 610 610 }, 611 611 … … 620 620 { 621 621 label : 'Veľkosť', 622 voiceLabel : ' Font Size', // MISSING622 voiceLabel : 'Veľkosť písma', 623 623 panelTitle : 'Veľkosť' 624 624 }, … … 628 628 textColorTitle : 'Farba textu', 629 629 bgColorTitle : 'Farba pozadia', 630 panelTitle : ' Colors', // MISSING630 panelTitle : 'Farby', 631 631 auto : 'Automaticky', 632 632 more : 'Viac farieb...' … … 720 720 }, 721 721 722 maximize : 'Maxim ize', // MISSING723 minimize : 'Minim ize', // MISSING722 maximize : 'Maximalizovať', 723 minimize : 'Minimalizovať', 724 724 725 725 fakeobjects : -
CKEditor/branches/versions/3.5.x/_source/plugins/button/plugin.js
r6396 r6898 276 276 /** 277 277 * Adds a button definition to the UI elements list. 278 * @param {String} The button name.279 * @param {Object} The button definition.278 * @param {String} name The button name. 279 * @param {Object} definition The button definition. 280 280 * @example 281 281 * editorInstance.ui.addButton( 'MyBold', -
CKEditor/branches/versions/3.5.x/_source/plugins/clipboard/dialogs/paste.js
r6655 r6898 67 67 this.parts.dialog.$.offsetHeight; 68 68 69 var htmlToLoad = 70 '<html dir="' + editor.config.contentsLangDirection + '"' + 71 ' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' + 72 '<head><style>body { margin: 3px; height: 95%; } </style></head><body>' + 73 '<script id="cke_actscrpt" type="text/javascript">' + 74 'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, this ) + ', this );' + 75 '</script></body>' + 76 '</html>'; 77 78 var src = 79 CKEDITOR.env.air ? 80 'javascript:void(0)' : 81 isCustomDomain ? 82 'javascript:void((function(){' + 83 'document.open();' + 84 'document.domain=\'' + document.domain + '\';' + 85 'document.close();' + 86 '})())"' 87 : 88 ''; 89 90 var iframe = CKEDITOR.dom.element.createFromHtml( 91 '<iframe' + 92 ' class="cke_pasteframe"' + 93 ' frameborder="0" ' + 94 ' allowTransparency="true"' + 95 ' src="' + src + '"' + 96 ' role="region"' + 97 ' aria-label="' + lang.pasteArea + '"' + 98 ' aria-describedby="' + this.getContentElement( 'general', 'pasteMsg' ).domId + '"' + 99 ' aria-multiple="true"' + 100 '></iframe>' ); 101 102 iframe.on( 'load', function( e ) 103 { 104 e.removeListener(); 105 106 var doc = iframe.getFrameDocument(); 107 doc.write( htmlToLoad ); 108 109 if ( CKEDITOR.env.air ) 110 onPasteFrameLoad.call( this, doc.getWindow().$ ); 111 }, 112 this ); 113 114 iframe.setCustomData( 'dialog', this ); 115 116 var field = this.getContentElement( 'general', 'editing_area' ), 117 container = field.getElement(); 118 container.setHtml( '' ); 119 container.append( iframe ); 120 121 // IE need a redirect on focus to make 122 // the cursor blinking inside iframe. (#5461) 123 if ( CKEDITOR.env.ie ) 124 { 125 var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' ); 126 focusGrabber.on( 'focus', function() 127 { 128 iframe.$.contentWindow.focus(); 129 }); 130 container.append( focusGrabber ); 131 132 // Override focus handler on field. 133 field.focus = function() 134 { 135 focusGrabber.focus(); 136 this.fire( 'focus' ); 137 }; 138 } 139 140 field.getInputElement = function(){ return iframe; }; 141 142 // Force container to scale in IE. 143 if ( CKEDITOR.env.ie ) 144 { 145 container.setStyle( 'display', 'block' ); 146 container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' ); 147 } 69 this.setupContent(); 148 70 }, 149 71 … … 162 84 onOk : function() 163 85 { 164 var container = this.getContentElement( 'general', 'editing_area' ).getElement(), 165 iframe = container.getElementsByTag( 'iframe' ).getItem( 0 ), 166 editor = this.getParentEditor(), 167 body = iframe.getFrameDocument().getBody(), 168 bogus = body.getBogus(), 169 html; 170 bogus && bogus.remove(); 171 // Saving the contents in variable so changes until paste is complete will not take place (#7500) 172 html = body.getHtml(); 173 174 setTimeout( function(){ 175 editor.fire( 'paste', { 'html' : html } ); 176 }, 0 ); 177 86 this.commitContent(); 178 87 }, 179 88 … … 209 118 win.focus(); 210 119 }, 500 ); 120 }, 121 setup : function() 122 { 123 var dialog = this.getDialog(); 124 var htmlToLoad = 125 '<html dir="' + editor.config.contentsLangDirection + '"' + 126 ' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' + 127 '<head><style>body { margin: 3px; height: 95%; } </style></head><body>' + 128 '<script id="cke_actscrpt" type="text/javascript">' + 129 'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, dialog ) + ', this );' + 130 '</script></body>' + 131 '</html>'; 132 133 var src = 134 CKEDITOR.env.air ? 135 'javascript:void(0)' : 136 isCustomDomain ? 137 'javascript:void((function(){' + 138 'document.open();' + 139 'document.domain=\'' + document.domain + '\';' + 140 'document.close();' + 141 '})())"' 142 : 143 ''; 144 145 var iframe = CKEDITOR.dom.element.createFromHtml( 146 '<iframe' + 147 ' class="cke_pasteframe"' + 148 ' frameborder="0" ' + 149 ' allowTransparency="true"' + 150 ' src="' + src + '"' + 151 ' role="region"' + 152 ' aria-label="' + lang.pasteArea + '"' + 153 ' aria-describedby="' + dialog.getContentElement( 'general', 'pasteMsg' ).domId + '"' + 154 ' aria-multiple="true"' + 155 '></iframe>' ); 156 157 iframe.on( 'load', function( e ) 158 { 159 e.removeListener(); 160 161 var doc = iframe.getFrameDocument(); 162 doc.write( htmlToLoad ); 163 164 if ( CKEDITOR.env.air ) 165 onPasteFrameLoad.call( this, doc.getWindow().$ ); 166 }, dialog ); 167 168 iframe.setCustomData( 'dialog', dialog ); 169 170 var container = this.getElement(); 171 container.setHtml( '' ); 172 container.append( iframe ); 173 174 // IE need a redirect on focus to make 175 // the cursor blinking inside iframe. (#5461) 176 if ( CKEDITOR.env.ie ) 177 { 178 var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' ); 179 focusGrabber.on( 'focus', function() 180 { 181 iframe.$.contentWindow.focus(); 182 }); 183 container.append( focusGrabber ); 184 185 // Override focus handler on field. 186 this.focus = function() 187 { 188 focusGrabber.focus(); 189 this.fire( 'focus' ); 190 }; 191 } 192 193 this.getInputElement = function(){ return iframe; }; 194 195 // Force container to scale in IE. 196 if ( CKEDITOR.env.ie ) 197 { 198 container.setStyle( 'display', 'block' ); 199 container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' ); 200 } 201 }, 202 commit : function( data ) 203 { 204 var container = this.getElement(), 205 editor = this.getDialog().getParentEditor(), 206 body = this.getInputElement().getFrameDocument().getBody(), 207 bogus = body.getBogus(), 208 html; 209 bogus && bogus.remove(); 210 211 // Saving the contents so changes until paste is complete will not take place (#7500) 212 html = body.getHtml(); 213 214 setTimeout( function(){ 215 editor.fire( 'paste', { 'html' : html } ); 216 }, 0 ); 211 217 } 212 218 } -
CKEditor/branches/versions/3.5.x/_source/plugins/clipboard/plugin.js
r6655 r6898 215 215 // Turn off design mode temporarily before give focus to the paste bin. 216 216 if ( mode == 'text' ) 217 { 218 if ( CKEDITOR.env.ie ) 219 { 220 var ieRange = doc.getBody().$.createTextRange(); 221 ieRange.moveToElementText( pastebin.$ ); 222 ieRange.execCommand( 'Paste' ); 223 evt.data.preventDefault(); 224 } 225 else 226 pastebin.$.focus(); 227 } 217 pastebin.$.focus(); 228 218 else 229 219 { … … 378 368 editor.on( 'key', onKey, editor ); 379 369 380 var mode = editor.config.forcePasteAsPlainText ? 'text' : 'html';381 382 370 // We'll be catching all pasted content in one line, regardless of whether the 383 371 // it's introduced by a document command execution (e.g. toolbar buttons) or … … 386 374 { 387 375 var body = editor.document.getBody(); 388 body.on( ( ( mode == 'text' && CKEDITOR.env.ie ) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste', 389 function( evt ) 376 body.on( CKEDITOR.env.webkit ? 'paste' : 'beforepaste', function( evt ) 390 377 { 391 378 if ( depressBeforeEvent ) 392 379 return; 393 380 394 getClipboardData.call( editor, evt, mode, function ( data ) 381 // Fire 'beforePaste' event so clipboard flavor get customized 382 // by other plugins. 383 var eventData = { mode : 'html' }; 384 editor.fire( 'beforePaste', eventData ); 385 386 getClipboardData.call( editor, evt, eventData.mode, function ( data ) 395 387 { 396 388 // The very last guard to make sure the 397 389 // paste has successfully happened. 398 if ( ! CKEDITOR.tools.trim( data.toLowerCase().replace( /<span[^>]+data-cke-bookmark[^<]*?<\/span>/g,'') ) )390 if ( !( data = CKEDITOR.tools.trim( data.replace( /<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,'' ) ) ) ) 399 391 return; 400 392 401 393 var dataTransfer = {}; 402 dataTransfer[ mode ] = data;394 dataTransfer[ eventData.mode ] = data; 403 395 editor.fire( 'paste', dataTransfer ); 404 396 } ); -
CKEditor/branches/versions/3.5.x/_source/plugins/colorbutton/plugin.js
r6655 r6898 228 228 /** 229 229 * Whether to enable the "More Colors..." button in the color selectors. 230 * @name CKEDITOR.config.colorButton_enableMore 230 231 * @default true 231 232 * @type Boolean … … 241 242 * name and the slash character. For example, "FontColor1/FF9900" will be 242 243 * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1". 244 * @name CKEDITOR.config.colorButton_colors 243 245 * @type String 244 246 * @default '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF' … … 258 260 /** 259 261 * Holds the style definition to be used to apply the text foreground color. 262 * @name CKEDITOR.config.colorButton_foreStyle 260 263 * @type Object 261 264 * @example … … 276 279 /** 277 280 * Holds the style definition to be used to apply the text background color. 281 * @name CKEDITOR.config.colorButton_backStyle 278 282 * @type Object 279 283 * @example -
CKEditor/branches/versions/3.5.x/_source/plugins/colordialog/plugin.js
r5206 r6898 1 ( function() 1 /* 2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.plugins.colordialog = 2 7 { 3 CKEDITOR.plugins.colordialog =8 init : function( editor ) 4 9 { 5 init : function( editor ) 6 { 7 editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) ); 8 CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' ); 9 } 10 }; 10 editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) ); 11 CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' ); 12 } 13 }; 11 14 12 CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog ); 13 } )(); 15 CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog ); -
CKEditor/branches/versions/3.5.x/_source/plugins/dialog/dialogDefinition.js
r6655 r6898 283 283 * Function to execute whenever the UI element's parent dialog is closed. 284 284 * @name CKEDITOR.dialog.definition.uiElement.prototype.onHide 285 * @field 286 * @type Function 287 * @example 288 */ 289 290 /** 291 * Function to execute whenever the UI element's parent dialog's {@link CKEDITOR.dialog.definition.setupContent} method is executed. 292 * It usually takes care of the respective UI element as a standalone element. 293 * @name CKEDITOR.dialog.definition.uiElement.prototype.setup 294 * @field 295 * @type Function 296 * @example 297 */ 298 299 /** 300 * Function to execute whenever the UI element's parent dialog's {@link CKEDITOR.dialog.definition.commitContent} method is executed. 301 * It usually takes care of the respective UI element as a standalone element. 302 * @name CKEDITOR.dialog.definition.uiElement.prototype.commit 285 303 * @field 286 304 * @type Function -
CKEditor/branches/versions/3.5.x/_source/plugins/dialog/plugin.js
r6655 r6898 860 860 })(), 861 861 862 863 /** 864 * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each of the UI elements, with the arguments passed through it. 865 * It is usually being called when the dialog is opened, to put the initial value inside the field. 866 * @example 867 * dialogObj.setupContent(); 868 * @example 869 * var timestamp = ( new Date() ).valueOf(); 870 * dialogObj.setupContent( timestamp ); 871 */ 862 872 setupContent : function() 863 873 { … … 870 880 }, 871 881 882 /** 883 * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each of the UI elements, with the arguments passed through it. 884 * It is usually being called when the user confirms the dialog, to process the values. 885 * @example 886 * dialogObj.commitContent(); 887 * @example 888 * var timestamp = ( new Date() ).valueOf(); 889 * dialogObj.commitContent( timestamp ); 890 */ 872 891 commitContent : function() 873 892 { … … 1140 1159 * @param {String} elementId id of UI element. 1141 1160 * @example 1161 * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' ); 1142 1162 * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element. 1143 1163 */ … … 1153 1173 * @param {String} elementId id of UI element. 1154 1174 * @example 1175 * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) ); 1155 1176 * @returns {Object} The value of the UI element. 1156 1177 */ … … 1166 1187 * @param {Object} value The new value of the UI element. 1167 1188 * @example 1189 * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' ); 1168 1190 */ 1169 1191 setValueOf : function( pageId, elementId, value ) … … 1906 1928 currentCover; 1907 1929 1930 function cancelEvent( ev ) 1931 { 1932 ev.data.preventDefault(1); 1933 } 1934 1908 1935 function showCover( editor ) 1909 1936 { … … 1965 1992 coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) ); 1966 1993 coverElement.setOpacity( backgroundCoverOpacity != undefined ? backgroundCoverOpacity : 0.5 ); 1994 1995 coverElement.on( 'keydown', cancelEvent ); 1996 coverElement.on( 'keypress', cancelEvent ); 1997 coverElement.on( 'keyup', cancelEvent ); 1967 1998 1968 1999 coverElement.appendTo( CKEDITOR.document.getBody() ); -
CKEditor/branches/versions/3.5.x/_source/plugins/entities/plugin.js
r6396 r6898 172 172 /** 173 173 * Whether to use HTML entities in the output. 174 * @name CKEDITOR.config.entities 174 175 * @type Boolean 175 176 * @default true … … 183 184 * to HTML entities. The list of entities can be found at the 184 185 * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>. 186 * @name CKEDITOR.config.entities_latin 185 187 * @type Boolean 186 188 * @default true … … 195 197 * The list of entities can be found at the 196 198 * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>. 199 * @name CKEDITOR.config.entities_greek 197 200 * @type Boolean 198 201 * @default true … … 208 211 * For example, the phrase "This is Chinese: 汉语." is outputted 209 212 * as "This is Chinese: &#27721;&#35821;." 210 * @ type Boolean213 * @name CKEDITOR.config.entities_processNumerical 211 214 * @type Boolean|String 212 215 * @default false … … 220 223 * entry separated by a comma. Entities names or number must be used, exclusing 221 224 * the "&" preffix and the ";" termination. 225 * @name CKEDITOR.config.entities_additional 222 226 * @default '#39' // The single quote (') character. 223 227 * @type String -
CKEditor/branches/versions/3.5.x/_source/plugins/indent/plugin.js
r6655 r6898 452 452 * @name CKEDITOR.config.indentClasses 453 453 * @type Array 454 * default null454 * @default null 455 455 * @example 456 456 * // Use the classes 'Indent1', 'Indent2', 'Indent3' -
CKEditor/branches/versions/3.5.x/_source/plugins/justify/plugin.js
r6396 r6898 238 238 }); 239 239 })(); 240 241 /** 242 * List of classes to use for aligning the contents. If it's null, no classes will be used 243 * and instead the corresponding CSS values will be used. The array should contain 4 members, in the following order: left, center, right, justify. 244 * @name CKEDITOR.config.justifyClasses 245 * @type Array 246 * @default null 247 * @example 248 * // Use the classes 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' 249 * config.justifyClasses = [ 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' ]; 250 */ -
CKEditor/branches/versions/3.5.x/_source/plugins/pastefromword/plugin.js
r6655 r6898 5 5 (function() 6 6 { 7 function forceHtmlMode( evt ) { evt.data.mode = 'html'; } 8 7 9 CKEDITOR.plugins.add( 'pastefromword', 8 10 { … … 16 18 { 17 19 evt && evt.removeListener(); 20 editor.removeListener( 'beforePaste', forceHtmlMode ); 18 21 forceFromWord && setTimeout( function() { forceFromWord = 0; }, 0 ); 19 22 }; … … 28 31 exec : function() 29 32 { 33 // Ensure the received data format is HTML and apply content filtering. (#6718) 30 34 forceFromWord = 1; 31 if ( editor.execCommand( 'paste' ) === false ) 35 editor.on( 'beforePaste', forceHtmlMode ); 36 37 if ( editor.execCommand( 'paste', 'html' ) === false ) 32 38 { 33 39 editor.on( 'dialogShow', function ( evt ) -
CKEditor/branches/versions/3.5.x/_source/plugins/pastetext/dialogs/pastetext.js
r6396 r6898 14 14 minHeight : 240, 15 15 16 onShow : function() 17 { 18 // Reset the textarea value. 19 this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' ); 20 }, 21 22 onOk : function() 23 { 24 // Get the textarea value. 25 var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(), 26 editor = this.getParentEditor(); 27 28 setTimeout( function() 29 { 30 editor.fire( 'paste', { 'text' : text } ); 31 }, 0 ); 32 }, 16 onShow : function(){ this.setupContent(); }, 17 onOk : function(){ this.commitContent(); }, 33 18 34 19 contents : … … 61 46 { 62 47 this.getElement().focus(); 48 }, 49 setup : function() 50 { 51 this.setValue( '' ); 52 }, 53 commit : function() 54 { 55 var value = this.getValue(); 56 setTimeout( function() 57 { 58 editor.fire( 'paste', { 'text' : value } ); 59 }, 0 ); 63 60 } 64 61 } -
CKEditor/branches/versions/3.5.x/_source/plugins/pastetext/plugin.js
r6396 r6898 59 59 editor.on( 'beforeCommandExec', function ( evt ) 60 60 { 61 if ( evt.data.name == 'paste' ) 61 var mode = evt.data.commandData; 62 // Do NOT overwrite if HTML format is explicitly requested. 63 if ( evt.data.name == 'paste' && mode != 'html' ) 62 64 { 63 65 editor.execCommand( 'pastetext' ); … … 65 67 } 66 68 }, null, null, 0 ); 69 70 editor.on( 'beforePaste', function( evt ) 71 { 72 evt.data.mode = 'text'; 73 }); 67 74 } 68 75 … … 83 90 * editor, loosing any formatting information possibly available in the source 84 91 * text. 92 * <strong>Note:</strong> paste from word is not affected by this configuration. 85 93 * @name CKEDITOR.config.forcePasteAsPlainText 86 94 * @type Boolean -
CKEditor/branches/versions/3.5.x/_source/plugins/scayt/plugin.js
r6655 r6898 664 664 return null; 665 665 // Remove unused commands and menuitems 666 for ( iin moreSuggestions )667 { 668 delete editor._.menuItems[ i];669 delete editor._.commands[ i];666 for ( var m in moreSuggestions ) 667 { 668 delete editor._.menuItems[ m ]; 669 delete editor._.commands[ m ]; 670 670 } 671 for ( iin mainSuggestions )672 { 673 delete editor._.menuItems[ i];674 delete editor._.commands[ i];671 for ( m in mainSuggestions ) 672 { 673 delete editor._.menuItems[ m ]; 674 delete editor._.commands[ m ]; 675 675 } 676 676 moreSuggestions = {}; // Reset items. -
CKEditor/branches/versions/3.5.x/_source/plugins/selection/plugin.js
r6655 r6898 568 568 569 569 var styleObjectElements = 570 {571 img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,572 a:1, input:1, form:1, select:1, textarea:1, button:1, fieldset:1, th:1, thead:1,tfoot:1573 };570 { 571 img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1, 572 a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1 573 }; 574 574 575 575 CKEDITOR.dom.selection.prototype = -
CKEditor/branches/versions/3.5.x/_source/plugins/styles/plugin.js
r6655 r6898 816 816 var root = range.getCommonAncestor( true, true ), 817 817 element = root.getAscendant( this.element, true ); 818 element && setupElement( element, this );818 element && !element.isReadOnly() && setupElement( element, this ); 819 819 } 820 820 … … 873 873 while ( ( block = iterator.getNextParagraph() ) ) // Only one = 874 874 { 875 var newBlock = getElement( this, doc, block ); 876 replaceBlock( block, newBlock ); 875 if ( !block.isReadOnly() ) 876 { 877 var newBlock = getElement( this, doc, block ); 878 replaceBlock( block, newBlock ); 879 } 877 880 } 878 881 … … 1446 1449 else 1447 1450 styleText = unparsedCssText; 1451 1452 // Normalize font-family property, ignore quotes and being case insensitive. (#7322) 1453 // http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property 1454 styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val ) 1455 { 1456 var names = val.split( ',' ); 1457 for ( var i = 0; i < names.length; i++ ) 1458 names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) ); 1459 return prop + names.join( ',' ); 1460 }); 1448 1461 1449 1462 // Shrinking white-spaces around colon and semi-colon (#4147). -
CKEditor/branches/versions/3.5.x/_source/plugins/undo/plugin.js
r6655 r6898 546 546 * The number of undo steps to be saved. The higher this setting value the more 547 547 * memory is used for it. 548 * @name CKEDITOR.config.undoStackSize 548 549 * @type Number 549 550 * @default 20 -
CKEditor/branches/versions/3.5.x/_source/plugins/wysiwygarea/plugin.js
r6655 r6898 11 11 (function() 12 12 { 13 // List of elements in which has no way to move editing focus outside.14 var nonExitableElementNames = { table:1,pre:1 };15 16 13 // Matching an empty paragraph at the end of document. 17 var emptyParagraphRegexp = /(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center )[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;14 var emptyParagraphRegexp = /(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi; 18 15 19 16 var notWhitespaceEval = CKEDITOR.dom.walker.whitespaces( true ); 20 17 21 // Elements that could have empty new line around, including table, pre-formatted block,hr, page-break. (#6554)22 function nonE xitable( element )18 // Elements that could blink the cursor anchoring beside it, like hr, page-break. (#6554) 19 function nonEditable( element ) 23 20 { 24 return ( element.getName() in nonExitableElementNames ) 25 || element.isBlockBoundary() && CKEDITOR.dtd.$empty[ element.getName() ]; 21 return element.isBlockBoundary() && CKEDITOR.dtd.$empty[ element.getName() ]; 26 22 } 27 23 … … 370 366 lastNode = pathBlock && pathBlock.getLast( isNotEmpty ); 371 367 372 // In case it's not ended with block element and doesn't have bogus yet. (#7467) 368 // Check some specialities of the current path block: 369 // 1. It is really displayed as block; (#7221) 370 // 2. It doesn't end with one inner block; (#7467) 371 // 3. It doesn't have bogus br yet. 373 372 if ( pathBlock 373 && pathBlock.isBlockBoundary() 374 374 && !( lastNode && lastNode.type == CKEDITOR.NODE_ELEMENT && lastNode.isBlockBoundary() ) 375 375 && !pathBlock.is( 'pre' ) … … 410 410 if ( element && 411 411 element.type == CKEDITOR.NODE_ELEMENT && 412 !nonE xitable( element ) )412 !nonEditable( element ) ) 413 413 { 414 414 range.moveToElementEditStart( element ); … … 420 420 if ( element && 421 421 element.type == CKEDITOR.NODE_ELEMENT && 422 !nonE xitable( element ) )422 !nonEditable( element ) ) 423 423 { 424 424 range.moveToElementEditEnd( element ); … … 433 433 } 434 434 435 // All browsers are incapable to moving cursor out of certain non-exitable 436 // blocks (e.g. table, list, pre) at the end of document, make this happen by 437 // place a bogus node there, which would be later removed by dataprocessor. 438 var walkerRange = new CKEDITOR.dom.range( editor.document ), 439 walker = new CKEDITOR.dom.walker( walkerRange ); 440 walkerRange.selectNodeContents( body ); 441 walker.evaluator = function( node ) 442 { 443 return node.type == CKEDITOR.NODE_ELEMENT && ( node.getName() in nonExitableElementNames ); 444 }; 445 walker.guard = function( node, isMoveout ) 446 { 447 return !( ( node.type == CKEDITOR.NODE_TEXT && isNotWhitespace( node ) ) || isMoveout ); 448 }; 449 450 if ( walker.previous() ) 435 // Browsers are incapable of moving cursor out of certain block elements (e.g. table, div, pre) 436 // at the end of document, makes it unable to continue adding content, we have to make this 437 // easier by opening an new empty paragraph. 438 var testRange = new CKEDITOR.dom.range( editor.document ); 439 testRange.moveToElementEditEnd( editor.document.getBody() ); 440 var testPath = new CKEDITOR.dom.elementPath( testRange.startContainer ); 441 if ( !testPath.blockLimit.is( 'body') ) 451 442 { 452 443 editor.fire( 'updateSnapshot' ); … … 456 447 var paddingBlock; 457 448 if ( enterMode != CKEDITOR.ENTER_BR ) 458 paddingBlock = body.append( new CKEDITOR.dom.element( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) );449 paddingBlock = body.append( editor.document.createElement( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ); 459 450 else 460 451 paddingBlock = body; -
CKEditor/branches/versions/3.5.x/_source/themes/default/theme.js
r6655 r6898 11 11 CKEDITOR.themes.add( 'default', (function() 12 12 { 13 var hiddenSkins = {}; 14 13 15 function checkSharedSpace( editor, spaceName ) 14 16 { … … 121 123 sharedTop && ( sharedTop.setHtml( topHtml ) , topHtml = '' ); 122 124 sharedBottoms && ( sharedBottoms.setHtml( bottomHtml ), bottomHtml = '' ); 125 126 var hideSkin = '<style>.' + editor.skinClass + '{visibility:hidden;}</style>'; 127 if ( hiddenSkins[ editor.skinClass ] ) 128 hideSkin = ''; 129 else 130 hiddenSkins[ editor.skinClass ] = 1; 123 131 124 132 var container = CKEDITOR.dom.element.createFromHtml( [ … … 143 151 '</tbody></table>' + 144 152 //Hide the container when loading skins, later restored by skin css. 145 '<style>.', editor.skinClass, '{visibility:hidden;}</style>'+153 hideSkin + 146 154 '</span>' + 147 155 '</span>' +
Note: See TracChangeset
for help on using the changeset viewer.
