Changeset 411

Show
Ignore:
Timestamp:
2007-07-06 06:57:34 (3 years ago)
Author:
martinkou
Message:

Fixed #100 : Implemented the 'FCKConfig.EditorAreaStyles' configuration entry.
Improved the replace dialog to scroll into view the matched text in the document.

Location:
FCKeditor/trunk
Files:
8 modified

Legend:

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

    r410 r411  
    294294                range.MoveToBookmark2( matchBookmark ) ; 
    295295                range.Select() ; 
     296                var focus = range._Range.endContainer ; 
     297                while ( focus && focus.nodeType != 1 ) 
     298                        focus = focus.parentNode ; 
     299                if ( focus ) 
     300                focus.scrollIntoView( false ) ; 
    296301                return true; 
    297302        } 
  • FCKeditor/trunk/editor/_source/classes/fcktoolbarfontformatcombo.js

    r132 r411  
    5050        // Add the Editor Area CSS to the panel to create a realistic preview. 
    5151        FCKTools.AppendStyleSheet( oTargetDoc, FCKConfig.ToolbarComboPreviewCSS ) ; 
     52        FCKTools.AppendStyleString( oTargetDoc, FCKConfig.EditorAreaStyles ) ; 
    5253 
    5354        // Add ID and Class to the body 
  • FCKeditor/trunk/editor/_source/classes/fcktoolbarstylecombo.js

    r132 r411  
    4646        // Add the Editor Area CSS to the panel so the style classes are previewed correctly. 
    4747        FCKTools.AppendStyleSheet( oTargetDoc, FCKConfig.ToolbarComboPreviewCSS ) ; 
     48        FCKTools.AppendStyleString( oTargetDoc, FCKConfig.EditorAreaStyles ) ; 
    4849        oTargetDoc.body.className += ' ForceBaseFont' ; 
    4950 
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r403 r411  
    743743        var sTags = '' ; 
    744744        var aCSSs = FCKConfig.EditorAreaCSS ; 
     745        var sStyles = FCKConfig.EditorAreaStyles ; 
    745746 
    746747        for ( var i = 0 ; i < aCSSs.length ; i++ ) 
    747748                sTags += '<link href="' + aCSSs[i] + '" rel="stylesheet" type="text/css" />' ; 
     749 
     750        if ( sStyles && sStyles.length > 0 ) 
     751                sTags += "<style>" + sStyles + "</style>" ; 
    748752 
    749753        return sTags ; 
  • FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js

    r132 r411  
    4545        documentElement.getElementsByTagName("HEAD")[0].appendChild( e ) ; 
    4646        return e ; 
     47} 
     48 
     49// Appends a CSS style string to a document. 
     50FCKTools._AppendStyleString = function( documentElement, cssStyles ) 
     51{ 
     52        var e = documentElement.createElement( "STYLE" ) ; 
     53        e.innerHTML = cssStyles ; 
     54        documentElement.getElementsByTagName( "HEAD" )[0].appendChild( e ) ; 
    4755} 
    4856 
  • FCKeditor/trunk/editor/_source/internals/fcktools_ie.js

    r132 r411  
    3131{ 
    3232        return documentElement.createStyleSheet( cssFileUrl ).owningElement ; 
     33} 
     34 
     35// Appends a CSS style string to a document. 
     36FCKTools._AppendStyleSheet = function( documentElement, cssStyles ) 
     37{ 
     38        var s = documentElement.createStyleSheet( "" ) ; 
     39        s.cssText = cssStyles ; 
    3340} 
    3441 
  • FCKeditor/trunk/editor/_source/internals/fcktools.js

    r308 r411  
    5050                return aStyleSheeArray ; 
    5151        } 
     52} 
     53 
     54FCKTools.AppendStyleString = function ( documentElement, cssStyles ) 
     55{ 
     56        this._AppendStyleString( documentElement, cssStyles ) ; 
    5257} 
    5358 
  • FCKeditor/trunk/fckconfig.js

    r410 r411  
    3131 
    3232FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; 
     33FCKConfig.EditorAreaStyles = '' ; 
    3334FCKConfig.ToolbarComboPreviewCSS = '' ; 
    3435 
     
    3940FCKConfig.FullPage = false ; 
    4041 
    41 FCKConfig.Debug = true ; 
     42FCKConfig.Debug = false ; 
    4243FCKConfig.AllowQueryStringDebug = true ; 
    4344