2
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
7
* Licensed under the terms of any of the following licenses at your
10
* - GNU General Public License Version 2 or later (the "GPL")
11
* http://www.gnu.org/licenses/gpl.html
13
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
* http://www.gnu.org/licenses/lgpl.html
16
* - Mozilla Public License Version 1.1 or later (the "MPL")
17
* http://www.mozilla.org/MPL/MPL-1.1.html
21
* This is the integration file for Active FoxPro Pages.
24
DEFINE CLASS goFckeditor AS CONTAINER OLEPUBLIC
32
DIMENSION aConfig(10,2)
34
&& -----------------------------------------------------------------------
35
FUNCTION fckeditor( tcInstanceName )
37
THIS.cInstanceName = tcInstanceName
38
THIS.BasePath = '/fckeditor/'
41
THIS.ToolbarSet = 'Default'
45
THIS.aConfig(lnLoop,lnLoop2) = ""
52
&& -----------------------------------------------------------------------
58
&& -----------------------------------------------------------------------
63
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
66
IF THIS.IsCompatible()
67
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
69
IF ( !THIS.ToolbarSet == '' )
70
lcLink = lcLink + [&Toolbar=]+THIS.ToolbarSet
73
&& Render the LINKED HIDDEN FIELD.
74
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[" style="display:none" />]
76
&& Render the configurations HIDDEN FIELD.
77
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [" style="display:none" />] +CHR(13)+CHR(10)
79
&& Render the EDITOR IFRAME.
80
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="Link" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="0" scrolling="no"></iframe>]
82
IF ( AT("%", THIS.cWIDTH)=0 )
83
WidthCSS = THIS.cWIDTH + 'px'
85
WidthCSS = THIS.cWIDTH
88
IF ( AT("%",THIS.cHEIGHT)=0 )
89
HeightCSS = THIS.cHEIGHT + 'px'
91
HeightCSS = THIS.cHEIGHT
94
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[">]+HtmlValue+[</textarea>]
97
html = html + [</div>]
103
&& -----------------------------------------------------------------------
104
FUNCTION IsCompatible()
111
sAgent = LOWER(ALLTRIM(request.servervariables("HTTP_USER_AGENT")))
113
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
114
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
115
llRetval= iVersion > 5.5
117
IF AT("gecko",sAgent)>0
118
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
119
llRetval =iVersion > 20030210
125
&& -----------------------------------------------------------------------
126
FUNCTION GetConfigFieldString()
132
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
133
IF !EMPTY(THIS.aConfig(lnLoop,1))
135
sParams = sParams + "&"
139
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
b'\\ No newline at end of file'