2
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
* Copyright (C) 2003-2008 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 page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
27
<title>FCKeditor - AFP Sample 2</title>
28
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
29
<meta name="robots" content="noindex, nofollow">
30
<link href="../sample.css" rel="stylesheet" type="text/css" />
32
<script type="text/javascript">
33
function FCKeditor_OnComplete( editorInstance )
35
var oCombo = document.getElementById( 'cmbLanguages' ) ;
36
for ( code in editorInstance.Language.AvailableLanguages )
38
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
40
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
43
function AddComboOption(combo, optionText, optionValue)
45
var oOption = document.createElement("OPTION") ;
47
combo.options.add(oOption) ;
49
oOption.innerHTML = optionText ;
50
oOption.value = optionValue ;
55
function ChangeLanguage( languageCode )
57
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
62
<h1>FCKeditor - AFP - Sample 2</h1>
63
This sample shows the editor in all its available languages.
65
<table cellpadding="0" cellspacing="0" border="0">
68
Select a language:
71
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
77
<form action="sampleposteddata.afp" method="post" target="_blank">
80
sBasePath="../../../fckeditor/" && Change this to your local path
82
oFCKeditor = CREATEOBJECT("FCKeditor")
83
oFCKeditor.fckeditor("FCKeditor1")
85
lcLanguage="" && Initialize Variable
86
lcLanguage=request.querystring("Lang") && Request Parameter
87
lcLanguage=oFCKeditor.StripAttacks(lcLanguage) && Remove special escape characters
89
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
90
oFCKeditor.aconfig[1,2]="true"
91
oFCKeditor.aconfig[2,1]="DefaultLanguage"
92
oFCKeditor.aconfig[2,2]="en"
94
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
95
oFCKeditor.aconfig[1,2]="false"
96
oFCKeditor.aconfig[2,1]="DefaultLanguage"
97
oFCKeditor.aconfig[2,2]=lcLanguage
100
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
101
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
103
oFCKeditor.BasePath = sBasePath
104
oFCKeditor.cValue = lcText
106
? oFCKeditor.Create()
110
<input type="submit" value="Submit">