I suggest to the autor of this fantastic componet to no use the response.write inside tha component.
I have integrated tis class inside other class and this modification is necessary to integrate the components.
IMHO is bettere i the method CREATE return the html instead of use the response.write.
Public Function Create( instanceName )
dim strHtml
If IsCompatible() Then
Dim sLink
sLink = sBasePath & "editor/fckeditor.html?InstanceName=" + instanceName
If (sToolbarSet & "") <> "" Then
sLink = sLink + "&Toolbar=" & sToolbarSet
End If
' Render the linked hidden field.
strHtml = strHtml& "<input type=""hidden"" id=""" & instanceName & """ name=""" & instanceName & """ value=""" & Server.HTMLEncode( sValue ) & """ />"
' Render the configurations hidden field.
strHtml = strHtml& "<input type=""hidden"" id=""" & instanceName & "___Config"" value=""" & GetConfigFieldString() & """ />"
' Render the editor IFRAME.
strHtml = strHtml& "<iframe id=""" & instanceName & "___Frame"" src=""" & sLink & """ width=""" & sWidth & """ height=""" & sHeight & """ frameborder=""no"" scrolling=""no""></iframe>"
Else
Dim sWidthCSS, sHeightCSS
If InStr( sWidth, "%" ) > 0 Then
sWidthCSS = sWidth
Else
sWidthCSS = sWidth & "px"
End If
If InStr( sHeight, "%" ) > 0 Then
sHeightCSS = sHeight
Else
sHeightCSS = sHeight & "px"
End If
strHtml = strHtml& "<textarea name=""" & instanceName & """ rows=""4"" cols=""40"" style=""width: " & sWidthCSS & "; height: " & sHeightCSS & """ wrap=""virtual"">" & Server.HTMLEncode( sValue ) & "</textarea>"
End If
Create = "<div>"&strHtml&"</div>"
End Function
I have integrated tis class inside other class and this modification is necessary to integrate the components.
IMHO is bettere i the method CREATE return the html instead of use the response.write.
Public Function Create( instanceName )
dim strHtml
If IsCompatible() Then
Dim sLink
sLink = sBasePath & "editor/fckeditor.html?InstanceName=" + instanceName
If (sToolbarSet & "") <> "" Then
sLink = sLink + "&Toolbar=" & sToolbarSet
End If
' Render the linked hidden field.
strHtml = strHtml& "<input type=""hidden"" id=""" & instanceName & """ name=""" & instanceName & """ value=""" & Server.HTMLEncode( sValue ) & """ />"
' Render the configurations hidden field.
strHtml = strHtml& "<input type=""hidden"" id=""" & instanceName & "___Config"" value=""" & GetConfigFieldString() & """ />"
' Render the editor IFRAME.
strHtml = strHtml& "<iframe id=""" & instanceName & "___Frame"" src=""" & sLink & """ width=""" & sWidth & """ height=""" & sHeight & """ frameborder=""no"" scrolling=""no""></iframe>"
Else
Dim sWidthCSS, sHeightCSS
If InStr( sWidth, "%" ) > 0 Then
sWidthCSS = sWidth
Else
sWidthCSS = sWidth & "px"
End If
If InStr( sHeight, "%" ) > 0 Then
sHeightCSS = sHeight
Else
sHeightCSS = sHeight & "px"
End If
strHtml = strHtml& "<textarea name=""" & instanceName & """ rows=""4"" cols=""40"" style=""width: " & sWidthCSS & "; height: " & sHeightCSS & """ wrap=""virtual"">" & Server.HTMLEncode( sValue ) & "</textarea>"
End If
Create = "<div>"&strHtml&"</div>"
End Function
RE: Suggestion: not use the response.write
I see the server side integration code supplied as a base starter kit - there's no reason you couldn't modify your own copy or even write your own. They are all just convenience wrappers anyway.
Cheers
Ben