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 4</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( 'cmbSkins' ) ;
37
// Get the active skin.
38
var sSkin = editorInstance.Config['SkinPath'] ;
39
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
41
oCombo.value = sSkin ;
42
oCombo.style.visibility = '' ;
45
function ChangeSkin( skinName )
47
window.location.href = window.location.pathname + "?Skin=" + skinName ;
52
<h1>FCKeditor - AFP - Sample 4</h1>
53
This sample shows how to change the editor skin.
55
<table cellpadding="0" cellspacing="0" border="0">
58
Select the skin to load:
61
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
62
<option value="default" selected>Default</option>
63
<option value="office2003">Office 2003</option>
64
<option value="silver">Silver</option>
70
<form action="sampleposteddata.afp" method="post" target="_blank">
73
sBasePath="../../../fckeditor/" && <-- Change this to your local path
75
oFCKeditor = CREATEOBJECT("FCKeditor")
76
oFCKeditor.fckeditor("FCKeditor1")
78
lcSkin=request.querystring("Skin") && Request Parameter
79
lcSkin=oFCKeditor.StripAttacks(lcSkin) && Remove special escape characters
81
oFCKeditor.aconfig[1,1]="SkinPath"
82
oFCKeditor.aconfig[1,2]="/fckeditor/editor/skins/"+lcSkin+"/" && <-- Change this to your local path
85
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
86
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
88
oFCKeditor.BasePath = sBasePath
89
oFCKeditor.cValue = lcText
95
<input type="submit" value="Submit">