资源简介
FCKeditor_2.6.4.1.zip,再高一层的版本就变成ckeditor了,貌似配置上会有点儿问题。
代码片段和文件信息
“““
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2009 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the “GPL“)
http://www.gnu.org/licenses/gpl.html
- GNU Lesser General Public License Version 2.1 or later (the “LGPL“)
http://www.gnu.org/licenses/lgpl.html
- Mozilla Public License Version 1.1 or later (the “MPL“)
http://www.mozilla.org/MPL/MPL-1.1.html
== END LICENSE ==
This is the integration file for Python.
“““
import cgi
import os
import re
import string
def escape(text replace=string.replace):
“““Converts the special characters ‘<‘ ‘>‘ and ‘&‘.
RFC 1866 specifies that these characters be represented
in HTML as < > and & respectively. In Python
1.5 we use the new string.replace() function for speed.
“““
text = replace(text ‘&‘ ‘&‘) # must be done 1st
text = replace(text ‘<‘ ‘<‘)
text = replace(text ‘>‘ ‘>‘)
text = replace(text ‘“‘ ‘"‘)
text = replace(text “‘“ ‘‘‘)
return text
# The FCKeditor class
class FCKeditor(object):
def __init__(self instanceName):
self.InstanceName = instanceName
self.basePath = ‘/fckeditor/‘
self.Width = ‘100%‘
self.Height = ‘200‘
self.ToolbarSet = ‘Default‘
self.Value = ‘‘;
self.Config = {}
def Create(self):
return self.CreateHtml()
def CreateHtml(self):
HtmlValue = escape(self.Value)
Html = ““
if (self.IsCompatible()):
File = “fckeditor.html“
link = “%seditor/%s?InstanceName=%s“ % (
self.basePath
File
self.InstanceName
)
if (self.ToolbarSet is not None):
link += “&Toolbar=%s“ % self.ToolbarSet
# Render the linked hidden field
Html += “yle=\“display:none\“ />“ % (
self.InstanceName
self.InstanceName
HtmlValue
)
# Render the configurations hidden field
Html += “yle=\“display:none\“ />“ % (
self.InstanceName
self.GetConfigFieldString()
)
# Render the editor iframe
Html += “rame id=\“%s\__frame\“ src=\“%s\“ width=\“%s\“ height=\“%s\“ frameborder=\“0\“ scrolling=\“no\“> rame>“ % (
self.InstanceName
link
self.Width
self.Height
)
else:
if (self.Width.find(“%%“) < 0):
WidthCSS = “%spx“ % self.Width
else:
WidthCSS = self.Width
if (self.Height.find(“%%“) < 0):
HeightCSS = “%spx“ % self.Height
else:
HeightCSS = self.Height
Html += ““ % (
self.InstanceName
WidthCSS
HeightCSS
HtmlValue
)
return Html
def IsCom
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-07-06 15:31 fckeditor\
目录 0 2009-07-06 15:31 fckeditor\editor\
目录 0 2009-07-06 15:31 fckeditor\editor\css\
目录 0 2009-07-06 15:31 fckeditor\editor\css\behaviors\
文件 236 2009-07-06 15:29 fckeditor\editor\css\behaviors\disablehandles.htc
文件 822 2009-07-06 15:29 fckeditor\editor\css\behaviors\showtableborders.htc
文件 2648 2009-07-06 10:10 fckeditor\editor\css\fck_editorarea.css
文件 4145 2009-07-06 10:10 fckeditor\editor\css\fck_internal.css
文件 1696 2009-07-06 10:10 fckeditor\editor\css\fck_showtableborders_gecko.css
目录 0 2009-07-06 15:31 fckeditor\editor\css\images\
文件 288 2009-07-06 15:29 fckeditor\editor\css\images\block_address.png
文件 293 2009-07-06 15:29 fckeditor\editor\css\images\block_blockquote.png
文件 229 2009-07-06 15:29 fckeditor\editor\css\images\block_div.png
文件 218 2009-07-06 15:29 fckeditor\editor\css\images\block_h1.png
文件 220 2009-07-06 15:29 fckeditor\editor\css\images\block_h2.png
文件 219 2009-07-06 15:29 fckeditor\editor\css\images\block_h3.png
文件 229 2009-07-06 15:29 fckeditor\editor\css\images\block_h4.png
文件 236 2009-07-06 15:29 fckeditor\editor\css\images\block_h5.png
文件 216 2009-07-06 15:29 fckeditor\editor\css\images\block_h6.png
文件 205 2009-07-06 15:29 fckeditor\editor\css\images\block_p.png
文件 223 2009-07-06 15:29 fckeditor\editor\css\images\block_pre.png
文件 184 2009-07-06 15:29 fckeditor\editor\css\images\fck_anchor.gif
文件 599 2009-07-06 15:29 fckeditor\editor\css\images\fck_flashlogo.gif
文件 105 2009-07-06 15:29 fckeditor\editor\css\images\fck_hiddenfield.gif
文件 54 2009-07-06 15:29 fckeditor\editor\css\images\fck_pagebreak.gif
文件 1709 2009-07-06 15:29 fckeditor\editor\css\images\fck_plugin.gif
目录 0 2009-07-06 15:31 fckeditor\editor\dialog\
目录 0 2009-07-06 15:31 fckeditor\editor\dialog\common\
文件 1773 2009-07-06 10:10 fckeditor\editor\dialog\common\fck_dialog_common.css
文件 10481 2009-07-06 10:10 fckeditor\editor\dialog\common\fck_dialog_common.js
目录 0 2009-07-06 15:31 fckeditor\editor\dialog\common\images\
............此处省略613个文件信息
- 上一篇:自定义主题改变AlertDialog样式
- 下一篇:网络安全基础第5版 答案
评论
共有 条评论