Show
Ignore:
Timestamp:
2008-02-21 12:02:57 (8 months ago)
Author:
wwalc
Message:

Fix for #1572. ColdFusion: fixed issues with setting the editor height

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/fckeditor.cfc

    r1565 r1581  
    113113> 
    114114        <cfset var result = "" /> 
    115  
    116         <cfscript> 
    117         // append unit "px" for numeric width and/or height values 
    118         if( isNumeric( this.width ) ) 
    119                 this.width = this.width & "px"; 
    120         if( isNumeric( this.height ) ) 
    121                 this.height = this.height & "px"; 
    122         </cfscript> 
    123  
    124         <cfscript> 
    125         result = result & "<textarea name=""#this.instanceName#"" rows=""4"" cols=""40"" style=""WIDTH: #this.width#; HEIGHT: #this.height#"">#HTMLEditFormat(this.value)#</textarea>" & chr(13) & chr(10); 
     115        <cfset var sWidthCSS = "" /> 
     116        <cfset var sHeightCSS = "" /> 
     117 
     118        <cfscript> 
     119        if( Find( "%", this.width ) gt 0) 
     120                sWidthCSS = this.width; 
     121        else 
     122                sWidthCSS = this.width & "px"; 
     123 
     124        if( Find( "%", this.width ) gt 0) 
     125                sHeightCSS = this.height; 
     126        else 
     127                sHeightCSS = this.height & "px"; 
     128 
     129        result = "<textarea name=""#this.instanceName#"" rows=""4"" cols=""40"" style=""width: #sWidthCSS#; height: #sHeightCSS#"">#HTMLEditFormat(this.value)#</textarea>" & chr(13) & chr(10); 
    126130        </cfscript> 
    127131        <cfreturn result />