4
FCKeditor - The text editor for Internet - http://www.fckeditor.net
5
Copyright (C) 2003-2007 Frederico Caldeira Knabben
9
Licensed under the terms of any of the following licenses at your
12
- GNU General Public License Version 2 or later (the "GPL")
13
http://www.gnu.org/licenses/gpl.html
15
- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
16
http://www.gnu.org/licenses/lgpl.html
18
- Mozilla Public License Version 1.1 or later (the "MPL")
19
http://www.mozilla.org/MPL/MPL-1.1.html
29
# Ensure that the fckeditor.py is included in your classpath
32
# Tell the browser to render html
33
print "Content-Type: text/html"
37
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
40
<title>FCKeditor - Sample</title>
41
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
42
<meta name="robots" content="noindex, nofollow">
43
<link href="../sample.css" rel="stylesheet" type="text/css" />
46
<h1>FCKeditor - Python - Sample 1</h1>
47
This sample displays a normal HTML form with an FCKeditor with full features
50
<form action="sampleposteddata.py" method="post" target="_blank">
53
# This is the real work
55
sBasePath = os.environ.get("SCRIPT_NAME")
56
sBasePath = sBasePath[0:sBasePath.find("_samples")]
58
oFCKeditor = fckeditor.FCKeditor('FCKeditor1')
59
oFCKeditor.BasePath = sBasePath
60
oFCKeditor.Value = """This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>."""
61
print oFCKeditor.Create()
66
<input type="submit" value="Submit">
70
# For testing your environments
72
for key in os.environ.keys():
73
print "%s: %s<br>" % (key, os.environ.get(key, ""))