Changeset 302

Show
Ignore:
Timestamp:
2007-05-16 11:29:15 (3 years ago)
Author:
fredck
Message:

Fixed #194: Implemented the "Data Processor" feature.

Location:
FCKeditor/trunk
Files:
7 added
15 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/dialog/fck_source.html

    r132 r302  
    5050                oEditor.FCKUndo.SaveUndoStep() ; 
    5151 
    52         FCK.SetHTML( document.getElementById('txtSource').value, false ) ; 
     52        FCK.SetData( document.getElementById('txtSource').value, false ) ; 
    5353 
    5454        return true ; 
  • FCKeditor/trunk/editor/dialog/fck_spellerpages.html

    r132 r302  
    5252{ 
    5353        if ( numberOCorrections > 0 ) 
    54                 oEditor.FCK.SetHTML( document.getElementById('txtHtml').value ) ; 
     54                oEditor.FCK.SetData( document.getElementById('txtHtml').value ) ; 
    5555        window.parent.Cancel() ; 
    5656} 
  • FCKeditor/trunk/editor/dialog/fck_template.html

    r132 r302  
    192192 
    193193        if ( GetE('xChkReplaceAll').checked ) 
    194                 FCK.SetHTML( FCK._Templates[index].Html ) ; 
     194                FCK.SetData( FCK._Templates[index].Html ) ; 
    195195        else 
    196196                FCK.InsertHtml( FCK._Templates[index].Html ) ; 
  • FCKeditor/trunk/editor/fckeditor.html

    r176 r302  
    6464LoadScript( '_source/internals/fckurlparams.js' ) ; 
    6565LoadScript( '_source/classes/fckevents.js' ) ; 
     66LoadScript( '_source/classes/fckdataprocessor.js' ) ; 
    6667LoadScript( '_source/internals/fck.js' ) ; 
    6768LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ; 
  • FCKeditor/trunk/editor/_source/classes/fckeditingarea.js

    r205 r302  
    6666                else if ( !secondCall ) 
    6767                { 
    68                         // If nothing in the body, place a BOGUS tag so the cursor will appear. 
    69                         if ( FCKBrowserInfo.IsGecko ) 
    70                                 html = html.replace( /(<body[^>]*>)\s*(<\/body>)/i, '$1' + GECKO_BOGUS + '$2' ) ; 
    71  
    7268                        // Gecko moves some tags out of the body to the head, so we must use 
    7369                        // innerHTML to set the body contents (SF BUG 1526154). 
     
    8379                                        oMatch[3] ;                                     // This is the HTML from the </body> tag, inclusive. 
    8480 
    85                                 this._BodyHTML = oMatch[2] ;    // This is the BODY tag contents. 
     81                                var sBody = oMatch[2].Trim() ;  // This is the BODY tag contents. 
     82 
     83                                // If nothing in the body, place a BOGUS tag so the cursor will appear. 
     84                                if ( FCKBrowserInfo.IsGecko && ( sBody.length == 0 || FCKRegexLib.EmptyParagraph.test( sBody ) ) ) 
     85                                        sBody = GECKO_BOGUS ; 
     86 
     87                                this._BodyHTML = sBody ; 
     88 
    8689                        } 
    8790                        else 
  • FCKeditor/trunk/editor/_source/commandclasses/fck_othercommands.js

    r294 r302  
    186186{ 
    187187        FCKUndo.SaveUndoStep() ; 
    188         FCK.SetHTML( '' ) ; 
     188        FCK.SetData( '' ) ; 
    189189        FCKUndo.Typing = true ; 
    190190} 
  • FCKeditor/trunk/editor/_source/fckscriptloader.js

    r176 r302  
    9292FCKScriptLoader.AddScript( 'FCKConstants' ) ; 
    9393FCKScriptLoader.AddScript( 'FCKJSCoreExtensions' ) ; 
     94 
     95FCKScriptLoader.AddScript( 'FCKDataProcessor'   , 'classes/'    , ['FCKConfig','FCKBrowserInfo','FCKRegexLib','FCKXHtml'] ) ; 
     96FCKScriptLoader.AddScript( 'FCKDocumentFragment', 'classes/'    , ['FCKDomTools'], FCK_SPECIFIC ) ; 
     97FCKScriptLoader.AddScript( 'FCKDomRange'                , 'classes/'    , ['FCKBrowserInfo','FCKJSCoreExtensions','FCKW3CRange','FCKElementPath','FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC_SPECIFIC ) ; 
     98FCKScriptLoader.AddScript( 'FCKElementPath'             , 'classes/'    , ['FCKListsLib'], FCK_GENERIC ) ; 
     99FCKScriptLoader.AddScript( 'FCKEnterKey'                , 'classes/'    , ['FCKDomRange','FCKDomTools','FCKTools','FCKKeystrokeHandler','FCKListHandler'], FCK_GENERIC ) ; 
    94100FCKScriptLoader.AddScript( 'FCKImagePreloader'  , 'classes/' ) ; 
     101FCKScriptLoader.AddScript( 'FCKKeystrokeHandler', 'classes/'    , ['FCKConstants','FCKBrowserInfo','FCKTools'], FCK_GENERIC ) ; 
     102FCKScriptLoader.AddScript( 'FCKW3CRange'                , 'classes/'    , ['FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC ) ; 
     103 
    95104FCKScriptLoader.AddScript( 'FCKBrowserInfo'             , 'internals/'  , ['FCKJSCoreExtensions'] ) ; 
    96 FCKScriptLoader.AddScript( 'FCKConfig'                  , 'internals/' ) ; 
    97 FCKScriptLoader.AddScript( 'FCKListsLib'                , 'internals/' ) ; 
     105FCKScriptLoader.AddScript( 'FCKCodeFormatter'   , 'internals/' ) ; 
     106FCKScriptLoader.AddScript( 'FCKConfig'                  , 'internals/'  , ['FCKConstants'] ) ; 
    98107FCKScriptLoader.AddScript( 'FCKDebug'                   , 'internals/'  , ['FCKConfig'] ) ; 
    99108FCKScriptLoader.AddScript( 'FCKDomTools'                , 'internals/'  , ['FCKJSCoreExtensions'], FCK_GENERIC ) ; 
     109FCKScriptLoader.AddScript( 'FCKListsLib'                , 'internals/' ) ; 
     110FCKScriptLoader.AddScript( 'FCKListHandler'             , 'internals/'  , ['FCKJSCoreExtensions','FCKDomTools','FCKTools'], FCK_GENERIC ) ; 
     111FCKScriptLoader.AddScript( 'FCKRegexLib'                , 'internals/' ) ; 
    100112FCKScriptLoader.AddScript( 'FCKTools'                   , 'internals/'  , ['FCKJSCoreExtensions','FCKBrowserInfo'], FCK_GENERIC_SPECIFIC ) ; 
    101 FCKScriptLoader.AddScript( 'FCKElementPath'             , 'classes/'    , ['FCKListsLib'], FCK_GENERIC ) ; 
    102 FCKScriptLoader.AddScript( 'FCKDocumentFragment', 'classes/'    , ['FCKDomTools'], FCK_SPECIFIC ) ; 
    103 FCKScriptLoader.AddScript( 'FCKDomRange'                , 'classes/'    , ['FCKBrowserInfo','FCKJSCoreExtensions','FCKW3CRange','FCKElementPath','FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC_SPECIFIC ) ; 
    104 FCKScriptLoader.AddScript( 'FCKEnterKey'                , 'classes/'    , ['FCKDomRange','FCKDomTools','FCKTools','FCKKeystrokeHandler','FCKListHandler'], FCK_GENERIC ) ; 
    105 FCKScriptLoader.AddScript( 'FCKKeystrokeHandler', 'classes/'    , ['FCKConstants','FCKBrowserInfo','FCKTools'], FCK_GENERIC ) ; 
    106 FCKScriptLoader.AddScript( 'FCKListHandler'             , 'internals/'  , ['FCKJSCoreExtensions','FCKDomTools','FCKTools'], FCK_GENERIC ) ; 
    107 FCKScriptLoader.AddScript( 'FCKW3CRange'                , 'classes/'    , ['FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC ) ; 
     113FCKScriptLoader.AddScript( 'FCKXHtml'                   , 'internals/'  , ['FCKBrowserInfo','FCKCodeFormatter','FCKConfig','FCKDomTools','FCKListsLib','FCKRegexLib','FCKTools','FCKXHtmlEntities'], FCK_GENERIC_SPECIFIC ) ; 
     114FCKScriptLoader.AddScript( 'FCKXHtmlEntities'   , 'internals/'  , ['FCKConfig'] ) ; 
     115 
    108116// #################################### 
  • FCKeditor/trunk/editor/_source/internals/fck_gecko.js

    r257 r302  
    2828FCK.InitializeBehaviors = function() 
    2929{ 
    30         // When calling "SetHTML", the editing area IFRAME gets a fixed height. So we must recaulculate it. 
     30        // When calling "SetData", the editing area IFRAME gets a fixed height. So we must recaulculate it. 
    3131        if ( FCKBrowserInfo.IsGecko )           // Not for Safari/Opera. 
    3232                Window_OnResize() ; 
     
    150150        // Firefox can't handle correctly the editing of the STRONG and EM tags. 
    151151        // We must replace them with B and I. 
    152                 html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ; 
    153                 html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ; 
    154                 html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ; 
    155                 html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ; 
     152        html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ; 
     153        html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ; 
     154        html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ; 
     155        html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ; 
    156156 
    157157        // Delete the actual selection. 
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r273 r302  
    2626var FCK = 
    2727{ 
    28         Name            : FCKURLParams[ 'InstanceName' ], 
    29         Status          : FCK_STATUS_NOTLOADED, 
    30         EditMode        : FCK_EDITMODE_WYSIWYG, 
    31         Toolbar         : null, 
    32         HasFocus        : false, 
     28        Name                    : FCKURLParams[ 'InstanceName' ], 
     29        Status                  : FCK_STATUS_NOTLOADED, 
     30        EditMode                : FCK_EDITMODE_WYSIWYG, 
     31        Toolbar                 : null, 
     32        HasFocus                : false, 
     33        DataProcessor   : new FCKDataProcessor(), 
    3334 
    3435        AttachToOnSelectionChange : function( functionPointer ) 
     
    99100 
    100101                // Set the editor's startup contents 
    101                 this.SetHTML( this.GetLinkedFieldValue(), true ) ; 
     102                this.SetData( this.GetLinkedFieldValue(), true ) ; 
    102103        }, 
    103104 
     
    196197        }, 
    197198 
    198         GetXHTML : function( format ) 
     199        GetData : function( format ) 
    199200        { 
    200201                // We assume that if the user is in source editing, the editor value must 
     
    205206                this.FixBody() ; 
    206207 
    207                 var sXHTML ; 
    208208                var oDoc = FCK.EditorDocument ; 
    209  
    210209                if ( !oDoc ) 
    211210                        return null ; 
    212211 
    213                 if ( FCKConfig.FullPage ) 
    214                 { 
    215                         sXHTML = FCKXHtml.GetXHTML( oDoc.getElementsByTagName( 'html' )[0], true, format ) ; 
    216  
     212                var isFullPage = FCKConfig.FullPage ; 
     213 
     214                // Call the Data Processor to generate the output data. 
     215                var data = FCK.DataProcessor.ConvertToDataFormat( 
     216                        isFullPage ? oDoc.getElementsByTagName( 'html' )[0] : oDoc.body, 
     217                        !isFullPage, 
     218                        FCKConfig.IgnoreEmptyParagraphValue, 
     219                        format ) ; 
     220 
     221                // Restore protected attributes. 
     222                data = FCK.ProtectEventsRestore( data ) ; 
     223 
     224                if ( FCKBrowserInfo.IsIE ) 
     225                        data = data.replace( FCKRegexLib.ToReplace, '$1' ) ; 
     226 
     227                if ( isFullPage ) 
     228                { 
    217229                        if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 ) 
    218                                 sXHTML = FCK.DocTypeDeclaration + '\n' + sXHTML ; 
     230                                data = FCK.DocTypeDeclaration + '\n' + data ; 
    219231 
    220232                        if ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 ) 
    221                                 sXHTML = FCK.XmlDeclaration + '\n' + sXHTML ; 
    222                 } 
    223                 else 
    224                 { 
    225                         sXHTML = FCKXHtml.GetXHTML( oDoc.body, false, format ) ; 
    226  
    227                         if ( FCKConfig.IgnoreEmptyParagraphValue && FCKRegexLib.EmptyOutParagraph.test( sXHTML ) ) 
    228                                 sXHTML = '' ; 
    229                 } 
    230  
    231                 // Restore protected attributes. 
    232                 sXHTML = FCK.ProtectEventsRestore( sXHTML ) ; 
    233  
    234                 if ( FCKBrowserInfo.IsIE ) 
    235                         sXHTML = sXHTML.replace( FCKRegexLib.ToReplace, '$1' ) ; 
    236  
    237                 return FCKConfig.ProtectedSource.Revert( sXHTML ) ; 
     233                                data = FCK.XmlDeclaration + '\n' + data ; 
     234                } 
     235 
     236                return FCKConfig.ProtectedSource.Revert( data ) ; 
    238237        }, 
    239238 
     
    300299                if ( FCKBrowserInfo.IsIE ) 
    301300                        sTags += sTags.length > 0 ? '|ABBR' : 'ABBR' ; 
    302                  
     301 
    303302                var oRegex ; 
    304303                if ( sTags.length > 0 ) 
     
    310309                        html = html.replace( oRegex, '<\/FCK:$1>' ) ; 
    311310                } 
    312                  
     311 
    313312                // Protect some empty elements. We must do it separately becase the 
    314313                // original tag may not contain the closing slash, like <hr>: 
     
    328327        }, 
    329328 
    330         SetHTML : function( html, resetIsDirty ) 
     329        SetData : function( data, resetIsDirty ) 
    331330        { 
    332331                this.EditingArea.Mode = FCK.EditMode ; 
     
    334333                if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) 
    335334                { 
    336                         html = FCKConfig.ProtectedSource.Protect( html ) ; 
     335                        // Save the resetIsDirty for later use (async) 
     336                        this._ForceResetIsDirty = ( resetIsDirty === true ) ; 
     337 
     338                        // Protect parts of the code that must remain untouched (and invisible) 
     339                        // during editing. 
     340                        data = FCKConfig.ProtectedSource.Protect( data ) ; 
     341 
     342                        // Call the Data Processor to transform the data. 
     343                        data = FCK.DataProcessor.ConvertToHtml( data ) ; 
    337344 
    338345                        // Fix for invalid self-closing tags (see #152). 
    339                         html = html.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ; 
    340  
    341                         html = FCK.ProtectEvents( html ) ; 
    342                         html = FCK.ProtectUrls( html ) ; 
    343                         html = FCK.ProtectTags( html ) ; 
     346                        data = data.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ; 
     347 
     348                        // Protect event attributes (they could get fired in the editing area). 
     349                        data = FCK.ProtectEvents( data ) ; 
     350 
     351                        // Protect some things from the browser itself. 
     352                        data = FCK.ProtectUrls( data ) ; 
     353                        data = FCK.ProtectTags( data ) ; 
    344354 
    345355                        // Firefox can't handle correctly the editing of the STRONG and EM tags. 
    346356                        // We must replace them with B and I. 
     357                        // TODO : remove this check  if possible, as soon as the new style system is in use. 
    347358                        if ( FCKBrowserInfo.IsGecko ) 
    348359                        { 
    349                                 html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ; 
    350                                 html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ; 
    351                                 html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ; 
    352                                 html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ; 
     360                                data = data.replace( FCKRegexLib.StrongOpener, '<b$1' ) ; 
     361                                data = data.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ; 
     362                                data = data.replace( FCKRegexLib.EmOpener, '<i$1' ) ; 
     363                                data = data.replace( FCKRegexLib.EmCloser, '<\/i>' ) ; 
    353364                        } 
    354365 
    355                         this._ForceResetIsDirty = ( resetIsDirty === true ) ; 
    356  
    357                         var sHtml = '' ; 
    358  
    359                         if ( FCKConfig.FullPage ) 
    360                         { 
    361                                 // The HTML must be fixed if the <head> is not available. 
    362                                 if ( !FCKRegexLib.HeadOpener.test( html ) ) 
    363                                 { 
    364                                         // Check if the <html> is available. 
    365                                         if ( !FCKRegexLib.HtmlOpener.test( html ) ) 
    366                                                 html = '<html dir="' + FCKConfig.ContentLangDirection + '">' + html + '</html>' ; 
    367  
    368                                         // Add the <head>. 
    369                                         html = html.replace( FCKRegexLib.HtmlOpener, '$&<head></head>' ) ; 
    370                                 } 
    371  
    372                                 // Save the DOCTYPE. 
    373                                 FCK.DocTypeDeclaration = html.match( FCKRegexLib.DocTypeTag ) ; 
    374  
    375                                 if ( FCKBrowserInfo.IsIE ) 
    376                                         sHtml = FCK._GetBehaviorsStyle() ; 
    377                                 else if ( FCKConfig.ShowBorders ) 
    378                                         sHtml = '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
    379  
    380                                 sHtml += '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
    381  
    382                                 // Attention: do not change it before testing it well (sample07)! 
    383                                 // This is tricky... if the head ends with <meta ... content type>, 
    384                                 // Firefox will break. But, it works if we include the temporary 
    385                                 // links as the last elements in the HEAD. 
    386                                 sHtml = html.replace( FCKRegexLib.HeadCloser, sHtml + '$&' ) ; 
    387  
    388                                 // Insert the base tag (FCKConfig.BaseHref), if not exists in the source. 
    389                                 // The base must be the first tag in the HEAD, to get relative 
    390                                 // links on styles, for example. 
    391                                 if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( html ) ) 
    392                                         sHtml = sHtml.replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ; 
    393                         } 
    394                         else 
    395                         { 
    396                                 sHtml = 
    397                                         FCKConfig.DocType + 
    398                                         '<html dir="' + FCKConfig.ContentLangDirection + '"' ; 
    399  
    400                                 // On IE, if you are use a DOCTYPE differenft of HTML 4 (like 
    401                                 // XHTML), you must force the vertical scroll to show, otherwise 
    402                                 // the horizontal one may appear when the page needs vertical scrolling. 
    403                                 if ( FCKBrowserInfo.IsIE && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) ) 
    404                                         sHtml += ' style="overflow-y: scroll"' ; 
    405  
    406                                 sHtml += 
    407                                         '><head><title></title>' + 
    408                                         _FCK_GetEditorAreaStyleTags() + 
    409                                         '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
    410  
    411                                 if ( FCKBrowserInfo.IsIE ) 
    412                                         sHtml += FCK._GetBehaviorsStyle() ; 
    413                                 else if ( FCKConfig.ShowBorders ) 
    414                                         sHtml += '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
    415  
    416                                 sHtml += FCK.TempBaseTag ; 
    417  
    418                                 // Add ID and Class to the body 
    419                                 var sBodyTag = '<body' ; 
    420                                 if ( FCKConfig.BodyId && FCKConfig.BodyId.length > 0 ) 
    421                                         sBodyTag += ' id="' + FCKConfig.BodyId + '"' ; 
    422                                 if ( FCKConfig.BodyClass && FCKConfig.BodyClass.length > 0 ) 
    423                                         sBodyTag += ' class="' + FCKConfig.BodyClass + '"' ; 
    424                                 sHtml += '</head>' + sBodyTag + '>' ; 
    425  
    426                                 if ( FCKBrowserInfo.IsGecko && ( html.length == 0 || FCKRegexLib.EmptyParagraph.test( html ) ) ) 
    427                                         sHtml += GECKO_BOGUS ; 
    428                                 else 
    429                                         sHtml += html ; 
    430  
    431                                 sHtml += '</body></html>' ; 
    432                         } 
    433  
     366                        // Insert the base tag (FCKConfig.BaseHref), if not exists in the source. 
     367                        // The base must be the first tag in the HEAD, to get relative 
     368                        // links on styles, for example. 
     369                        if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( data ) ) 
     370                                data = data.replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ; 
     371 
     372                        // Build the HTML for the additional things we need on <head>. 
     373                        var sHeadExtra = '' ; 
     374 
     375                        if ( !FCKConfig.FullPage ) 
     376                                sHeadExtra += _FCK_GetEditorAreaStyleTags() ; 
     377 
     378                        if ( FCKBrowserInfo.IsIE ) 
     379                                sHeadExtra += FCK._GetBehaviorsStyle() ; 
     380                        else if ( FCKConfig.ShowBorders ) 
     381                                sHeadExtra += '<link href="' + FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
     382 
     383                        sHeadExtra += '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css" rel="stylesheet" type="text/css" _fcktemp="true" />' ; 
     384 
     385                        // Attention: do not change it before testing it well (sample07)! 
     386                        // This is tricky... if the head ends with <meta ... content type>, 
     387                        // Firefox will break. But, it works if we place our extra stuff as 
     388                        // the last elements in the HEAD. 
     389                        data = data.replace( FCKRegexLib.HeadCloser, sHeadExtra + '$&' ) ; 
     390 
     391                        // Load the HTML in the editing area. 
    434392                        this.EditingArea.OnLoad = _FCK_EditingArea_OnLoad ; 
    435                         this.EditingArea.Start( sHtml ) ; 
     393                        this.EditingArea.Start( data ) ; 
    436394                } 
    437395                else 
     
    443401 
    444402                        this.EditingArea.OnLoad = null ; 
    445                         this.EditingArea.Start( html ) ; 
     403                        this.EditingArea.Start( data ) ; 
    446404 
    447405                        // Enables the context menu in the textarea. 
     
    589547                FCK.EditMode = bIsWysiwyg ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ; 
    590548 
    591                 FCK.SetHTML( sHtml, !bIsDirty ) ; 
     549                FCK.SetData( sHtml, !bIsDirty ) ; 
    592550 
    593551                // Set the Focus. 
     
    628586 
    629587FCK.Events      = new FCKEvents( FCK ) ; 
    630 // GetHTML is Deprecated : returns the same value as GetXHTML. 
    631 FCK.GetHTML     = FCK.GetXHTML ; 
     588 
     589// DEPRECATED in favor or "GetData". 
     590FCK.GetHTML     = FCK.GetXHTML = FCK.GetData ; 
     591 
     592// DEPRECATED in favor of "SetData". 
     593FCK.SetHTML = FCK.SetData ; 
    632594 
    633595// Replace all events attributes (like onclick). 
  • FCKeditor/trunk/editor/_source/internals/fckregexlib.js

    r247 r302  
    2424var FCKRegexLib = 
    2525{ 
    26 // This is the Regular expression used by the SetHTML method for the "&apos;" entity. 
     26// This is the Regular expression used by the SetData method for the "&apos;" entity. 
    2727AposEntity              : /&apos;/gi , 
    2828 
     
    4242 
    4343HasBaseTag              : /<base /i , 
     44HasBodyTag              : /<body[\s|>]/i , 
    4445 
    4546HtmlOpener              : /<html\s?[^>]*>/i , 
     
    7071EmOpener                : /<EM([ \>])/gi , 
    7172EmCloser                : /<\/EM>/gi , 
    72 //AbbrOpener            : /<ABBR([ \>])/gi , 
    73 //AbbrCloser            : /<\/ABBR>/gi , 
    7473 
    7574GeckoEntitiesMarker : /#\?-\:/g , 
  • FCKeditor/trunk/fckpackager.xml

    r176 r302  
    7171                <File path="editor/_source/internals/fckurlparams.js" /> 
    7272                <File path="editor/_source/classes/fckevents.js" /> 
     73                <File path="editor/_source/classes/fckdataprocessor.js" /> 
    7374                <File path="editor/_source/internals/fck.js" /> 
    7475                <File path="editor/_source/internals/fck_ie.js" /> 
     
    156157                <File path="editor/_source/internals/fckurlparams.js" /> 
    157158                <File path="editor/_source/classes/fckevents.js" /> 
     159                <File path="editor/_source/classes/fckdataprocessor.js" /> 
    158160                <File path="editor/_source/internals/fck.js" /> 
    159161                <File path="editor/_source/internals/fck_gecko.js" /> 
  • FCKeditor/trunk/_samples/html/sample08.html

    r132 r302  
    6464 
    6565        // Set the editor contents (replace the actual one). 
    66         oEditor.SetHTML( 'This is the <b>new content</b> I want in the editor.' ) ; 
     66        oEditor.SetData( 'This is the <b>new content</b> I want in the editor.' ) ; 
    6767} 
    6868 
  • FCKeditor/trunk/_samples/html/sample13.html

    r132 r302  
    5353                { 
    5454                        // Set the current text in the textarea to the editor. 
    55                         oEditor.SetHTML( document.getElementById('_DataTextarea').value ) ; 
     55                        oEditor.SetData( document.getElementById('_DataTextarea').value ) ; 
    5656                } 
    5757 
  • FCKeditor/trunk/_test/automated/tests/suite.html

    r132 r302  
    3333        var suite = new top.jsUnitTestSuite() ; 
    3434 
     35        suite.addTestPage( '../tests/fckdataprocessor.html' ) ; 
     36        suite.addTestPage( '../tests/fckdomrange.html' ) ; 
    3537        suite.addTestPage( '../tests/fcktools.html' ) ; 
    3638        suite.addTestPage( '../tests/fckw3crange.html' ) ; 
    37         suite.addTestPage( '../tests/fckdomrange.html' ) ; 
    3839 
    3940        return suite ; 
  • FCKeditor/trunk/_whatsnew.html

    r299 r302  
    3535                New Features and Improvements:</p> 
    3636        <ul> 
    37                 <li>It is now possible to set the default target when creating links, with the new "<strong>DefaultLinkTarget</strong>" 
    38                         setting.</li> 
     37                <li>The editor now uses the <strong>Data Processor</strong> technology, which makes 
     38                        it possible to handle different input formats. A sample of it may be found at "editor/plugins/bbcode/_sample", 
     39                        that shows some simple BBCode support.</li> 
    3940        </ul> 
    4041        <p>