Index: /FCKeditor/trunk/_whatsnew.html =================================================================== --- /FCKeditor/trunk/_whatsnew.html (revision 1739) +++ /FCKeditor/trunk/_whatsnew.html (revision 1740) @@ -239,4 +239,7 @@
Index: /FCKeditor/trunk/editor/_source/classes/fckstyle.js =================================================================== --- /FCKeditor/trunk/editor/_source/classes/fckstyle.js (revision 1739) +++ /FCKeditor/trunk/editor/_source/classes/fckstyle.js (revision 1740) @@ -820,5 +820,5 @@ results.push( value ) ; } ) ; - + // Assigning innerHTML to
in IE causes all linebreaks to be reduced to spaces. // Assigning outerHTML toin IE doesn't work if theisn't contained in another node @@ -858,4 +858,7 @@ var doc = range.Window.document ; + var preBlocks = [] ; + var convertedPreBlocks = [] ; + while( ( block = iterator.GetNextParagraph() ) ) // Only one = { @@ -867,7 +870,13 @@ var blockIsPre = block.nodeName.IEquals( 'pre' ) ; if ( newBlockIsPre && !blockIsPre ) + { newBlock = this._ToPre( doc, block, newBlock ) ; + preBlocks.push( newBlock ) ; + } else if ( !newBlockIsPre && blockIsPre ) + { newBlock = this._FromPre( doc, block, newBlock ) ; + convertedPreBlocks.push( newBlock ) ; + } else // Convering from a regular block to another regular block. FCKDomTools.MoveChildren( block, newBlock ) ; @@ -876,4 +885,46 @@ block.parentNode.insertBefore( newBlock, block ) ; FCKDomTools.RemoveNode( block ) ; + } + + // Merge adjacentblocks for #1229. + for ( var i = 0 ; i < preBlocks.length - 1 ; i++ ) + { + // Check if the next block in HTML equals the nextblock generated. + if ( FCKDomTools.GetNextSourceElement( preBlocks[i], true, [], [], true ) != preBlocks[i+1] ) + continue ; + + // Merge the upperblock's content into the lowerblock. + // Remove the upperblock. + preBlocks[i+1].innerHTML = preBlocks[i].innerHTML + '\n\n' + preBlocks[i+1].innerHTML ; + FCKDomTools.RemoveNode( preBlocks[i] ) ; + } + + // Split convertedblocks for #1229. + for ( var i = 0 ; i < convertedPreBlocks.length ; i++ ) + { + var currentBlock = convertedPreBlocks[i] ; + var lastNewBlock = null ; + for ( var j = 0 ; j < currentBlock.childNodes.length ; j++ ) + { + var cursor = currentBlock.childNodes[j] ; + + // If we have two
s, and they're not at the beginning or the end, + // then we'll split up the contents following them into another block. + if ( cursor.nodeName.IEquals( 'br' ) && j != 0 && j != currentBlock.childNodes.length - 2 + && cursor.nextSibling && cursor.nextSibling.nodeName.IEquals( 'br' ) ) + { + FCKDomTools.RemoveNode( cursor.nextSibling ) ; + FCKDomTools.RemoveNode( cursor ) ; + j-- ; // restart at current index at next iteration + lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || currentBlock, doc.createElement( currentBlock.nodeName ) ) ; + continue ; + } + + if ( lastNewBlock ) + { + FCKDomTools.MoveNode( cursor, lastNewBlock ) ; + j-- ; // restart at current index at next iteration + } + } } Index: /FCKeditor/trunk/editor/lang/ca.js =================================================================== --- /FCKeditor/trunk/editor/lang/ca.js (revision 1739) +++ /FCKeditor/trunk/editor/lang/ca.js (revision 1740) @@ -27,11 +27,11 @@ Dir : "ltr", -ToolbarCollapse : "Col·lapsa la barra", -ToolbarExpand : "Amplia la barra", +ToolbarCollapse : "Redueix la barra d'eines", +ToolbarExpand : "Amplia la barra d'eines", // Toolbar Items and Context Menu Save : "Desa", NewPage : "Nova Pàgina", -Preview : "Vista Prèvia", +Preview : "Visualització prèvia", Cut : "Retalla", Copy : "Copia", @@ -59,5 +59,5 @@ InsertSmileyLbl : "Icona", InsertSmiley : "Insereix icona", -About : "Quant a FCKeditor", +About : "Quant a l'FCKeditor", Bold : "Negreta", Italic : "Cursiva", @@ -66,17 +66,17 @@ Subscript : "Subíndex", Superscript : "Superíndex", -LeftJustify : "Aliniament esquerra", -CenterJustify : "Aliniament centrat", -RightJustify : "Aliniament dreta", -BlockJustify : "Justifica", -DecreaseIndent : "Sagna el text", -IncreaseIndent : "Treu el sagnat del text", +LeftJustify : "Alinia a l'esquerra", +CenterJustify : "Centrat", +RightJustify : "Alinia a la dreta", +BlockJustify : "Justificat", +DecreaseIndent : "Redueix el sagnat", +IncreaseIndent : "Augmenta el sagnat", Blockquote : "Bloc de cita", Undo : "Desfés", Redo : "Refés", NumberedListLbl : "Llista numerada", -NumberedList : "Aplica o elimina la llista numerada", +NumberedList : "Numeració activada/desactivada", BulletedListLbl : "Llista de pics", -BulletedList : "Aplica o elimina la llista de pics", +BulletedList : "Pics activats/descativats", ShowTableBorders : "Mostra les vores de les taules", ShowDetails : "Mostra detalls", @@ -144,5 +144,5 @@ FormProp : "Propietats del formulari", -FontFormats : "Normal;Formatejat;Adreça;Encapçalament 1;Encapçalament 2;Encapçalament 3;Encapçalament 4;Encapçalament 5;Encapçalament 6", +FontFormats : "Normal;Formatejat;Adreça;Encapçalament 1;Encapçalament 2;Encapçalament 3;Encapçalament 4;Encapçalament 5;Encapçalament 6;Normal (DIV)", // Alerts and Messages @@ -375,5 +375,5 @@ // Speller Pages Dialog DlgSpellNotInDic : "No és al diccionari", -DlgSpellChangeTo : "Canvia a", +DlgSpellChangeTo : "Reemplaça amb", DlgSpellBtnIgnore : "Ignora", DlgSpellBtnIgnoreAll : "Ignora-les totes", @@ -381,12 +381,12 @@ DlgSpellBtnReplaceAll : "Canvia-les totes", DlgSpellBtnUndo : "Desfés", -DlgSpellNoSuggestions : "Cap sugerència", -DlgSpellProgress : "Comprovació ortogràfica en progrés", -DlgSpellNoMispell : "Comprovació ortogràfica completada", -DlgSpellNoChanges : "Comprovació ortogràfica: cap paraulada canviada", -DlgSpellOneChange : "Comprovació ortogràfica: una paraula canviada", -DlgSpellManyChanges : "Comprovació ortogràfica %1 paraules canviades", - -IeSpellDownload : "Comprovació ortogràfica no instal·lada. Voleu descarregar-ho ara?", +DlgSpellNoSuggestions : "Cap suggeriment", +DlgSpellProgress : "Verificació ortogràfica en curs...", +DlgSpellNoMispell : "Verificació ortogràfica acabada: no hi ha cap paraula mal escrita", +DlgSpellNoChanges : "Verificació ortogràfica: no s'ha canviat cap paraula", +DlgSpellOneChange : "Verificació ortogràfica: s'ha canviat una paraula", +DlgSpellManyChanges : "Verificació ortogràfica: s'han canviat %1 paraules", + +IeSpellDownload : "Verificació ortogràfica no instal·lada. Voleu descarregar-ho ara?", // Button Dialog @@ -431,6 +431,6 @@ DlgTextName : "Nom", DlgTextValue : "Valor", -DlgTextCharWidth : "Amplada de caràcter", -DlgTextMaxChars : "Màxim de caràcters", +DlgTextCharWidth : "Amplada", +DlgTextMaxChars : "Nombre màxim de caràcters", DlgTextType : "Tipus", DlgTextTypeText : "Text", @@ -452,6 +452,6 @@ DlgLstTypeLCase : "Lletres minúscules (a, b, c)", DlgLstTypeUCase : "Lletres majúscules (A, B, C)", -DlgLstTypeSRoman : "Números romans minúscules (i, ii, iii)", -DlgLstTypeLRoman : "Números romans majúscules (I, II, III)", +DlgLstTypeSRoman : "Números romans en minúscules (i, ii, iii)", +DlgLstTypeLRoman : "Números romans en majúscules (I, II, III)", // Document Properties Dialog @@ -502,5 +502,5 @@ Templates : "Plantilles", DlgTemplatesTitle : "Contingut plantilles", -DlgTemplatesSelMsg : "Si us plau, seleccioneu la plantilla per obrir en l'editor
(el contingut actual no serà enregistrat):", +DlgTemplatesSelMsg : "Si us plau, seleccioneu la plantilla per obrir a l'editor
(el contingut actual no serà enregistrat):", DlgTemplatesLoading : "Carregant la llista de plantilles. Si us plau, espereu...", DlgTemplatesNoTpl : "(No hi ha plantilles definides)",