Ticket #1622: 1622_FCKeditor.patch

File 1622_FCKeditor.patch, 3.5 kB (added by alfonsoml, 6 months ago)

Patch for the editor

  • editor/_source/internals/fcktools_gecko.js

     
    4040// Appends a CSS file to a document. 
    4141FCKTools._AppendStyleSheet = function( documentElement, cssFileUrl ) 
    4242{ 
    43         var e = documentElement.createElement( 'LINK' ) ; 
    44         e.rel   = 'stylesheet' ; 
    45         e.type  = 'text/css' ; 
    46         e.href  = cssFileUrl ; 
    47         documentElement.getElementsByTagName("HEAD")[0].appendChild( e ) ; 
    48         return e ; 
     43        var cssText = FCKCSSManager.GetCachedCSS( cssFileUrl ) ; 
     44 
     45        if ( cssText == null ) 
     46        { 
     47                var e = documentElement.createElement( 'LINK' ) ; 
     48                e.rel   = 'stylesheet' ; 
     49                e.type  = 'text/css' ; 
     50                e.href  = cssFileUrl ; 
     51                documentElement.getElementsByTagName( "HEAD" )[0].appendChild( e ) ; 
     52                return e ; 
     53        } 
     54        else 
     55        { 
     56                return FCKTools._AppendStyleString( documentElement, cssText ) ; 
     57        } 
    4958} 
    5059 
    5160// Appends a CSS style string to a document. 
  • editor/_source/internals/fcktools_ie.js

     
    2929// Appends one or more CSS files to a document. 
    3030FCKTools._AppendStyleSheet = function( documentElement, cssFileUrl ) 
    3131{ 
    32         return documentElement.createStyleSheet( cssFileUrl ).owningElement ; 
     32        var cssText = FCKCSSManager.GetCachedCSS( cssFileUrl ); 
     33 
     34        if ( cssText ) 
     35        { 
     36                return FCKTools._AppendStyleString( documentElement, cssText ) ; 
     37        } 
     38        else 
     39        { 
     40                return documentElement.createStyleSheet( cssFileUrl ).owningElement ; 
     41        } 
    3342} 
    3443 
    3544// Appends a CSS style string to a document. 
  • editor/fckeditor.html

     
    8383 
    8484function LoadCss( url ) 
    8585{ 
    86         document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" />' ) ; 
     86        FCKCSSManager.PrintCSSInclude( url ) ; 
    8787} 
    8888 
    8989// Main editor scripts. 
     
    186186LoadScript( '_source/classes/fckmenublockpanel.js' ) ; 
    187187LoadScript( '_source/classes/fckcontextmenu.js' ) ; 
    188188LoadScript( '_source/internals/fck_contextmenu.js' ) ; 
     189LoadScript( '_source/internals/fckcssmanager.js' ) ; 
    189190LoadScript( '_source/classes/fckplugin.js' ) ; 
    190191LoadScript( '_source/internals/fckplugins.js' ) ; 
    191192 
  • fckpackager.xml

     
    160160 
    161161                <File path="editor/_source/classes/fckplugin.js" /> 
    162162                <File path="editor/_source/internals/fckplugins.js" /> 
     163 
     164                <File path="editor/_source/internals/fckcssmanager.js" /> 
     165                <File path="editor/skins/silver/fck_editor.css" /> 
     166                <File path="editor/css/fck_editorarea.css" /> 
     167                <File path="editor/css/fck_internal.css" /> 
    163168        </PackageFile> 
    164169 
    165170        <PackageFile path="editor/js/fckeditorcode_gecko.js"> 
     
    255260 
    256261                <File path="editor/_source/classes/fckplugin.js" /> 
    257262                <File path="editor/_source/internals/fckplugins.js" /> 
     263 
     264                <File path="editor/_source/internals/fckcssmanager.js" /> 
     265                <File path="editor/skins/silver/fck_editor.css" /> 
     266                <File path="editor/css/fck_showtableborders_gecko.css" /> 
     267                <File path="editor/css/fck_editorarea.css" /> 
     268                <File path="editor/css/fck_internal.css" /> 
    258269        </PackageFile> 
    259270 
    260271</Package>