4
FCKeditor - The text editor for internet
5
Copyright (C) 2003-2005 Frederico Caldeira Knabben
7
Licensed under the terms of the GNU Lesser General Public License:
8
http://www.opensource.org/licenses/lgpl-license.php
10
For further information visit:
11
http://www.fckeditor.net/
13
"Support Open Source software. What about a donation today?"
15
File Name: sample01.py
19
Andrew Liu (andrew@liuholdings.com)
25
# Ensure that the fckeditor.py is included in your classpath
28
# Tell the browser to render html
29
print "Content-Type: text/html"
33
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
36
<title>FCKeditor - Sample</title>
37
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
38
<meta name="robots" content="noindex, nofollow">
39
<link href="../sample.css" rel="stylesheet" type="text/css" />
42
<h1>FCKeditor - Python - Sample 1</h1>
43
This sample displays a normal HTML form with an FCKeditor with full features
46
<form action="sampleposteddata.py" method="post" target="_blank">
49
# This is the real work
51
sBasePath = os.environ.get("SCRIPT_NAME")
52
sBasePath = sBasePath[0:sBasePath.find("_samples")]
54
oFCKeditor = fckeditor.FCKeditor('FCKeditor1')
55
oFCKeditor.BasePath = sBasePath
56
oFCKeditor.Value = """This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>."""
57
print oFCKeditor.Create()
62
<input type="submit" value="Submit">
66
# For testing your environments
68
for key in os.environ.keys():
69
print "%s: %s<br>" % (key, os.environ.get(key, ""))