CKEDITOR (FCKEDITOR) --- 目前最优秀的可见即可得网页编辑器之一
-
FCKEDITOR
同义词 CKEditor一般指FCKEDITOR
中文解释编辑
调用种类编辑
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
<?php functionFCKeditor_IsCompatibleBrowser() { if (isset( $_SERVER )){ $sAgent = $_SERVER [ 'HTTP_USER_AGENT' ]; } else { global $HTTP_SERVER_VARS ; if (isset( $HTTP_SERVER_VARS )){ $sAgent = $HTTP_SERVER_VARS [ 'HTTP_USER_AGENT' ]; } else { global $HTTP_USER_AGENT ; $sAgent = $HTTP_USER_AGENT ; } } if ( strpos ( $sAgent , 'MSIE' )!==false&& strpos ( $sAgent , 'mac' )===false&& strpos ( $sAgent , 'Opera' )===false) { $iVersion =(float) substr ( $sAgent , strpos ( $sAgent , 'MSIE' )+5,3); return ( $iVersion >=5.5); } elseif ( strpos ( $sAgent , 'Gecko/' )!==false) { $iVersion =(int) substr ( $sAgent , strpos ( $sAgent , 'Gecko/' )+6,8); return ( $iVersion >=20030210); } elseif ( strpos ( $sAgent , 'Opera/' )!==false) { $fVersion =(float) substr ( $sAgent , strpos ( $sAgent , 'Opera/' )+6,4); return ( $fVersion >=9.5); } elseif (preg_match( "|AppleWebKit/(\d+)|i" , $sAgent , $matches )) { $iVersion = $matches [1]; return ( $matches [1]>=522); } else returnfalse; } classFCKeditor { public $InstanceName ; public $BasePath ; public $Width ; public $Height ; public $ToolbarSet ; public $Value ; public $Config ; publicfunction__construct( $instanceName ) { $this ->InstanceName= $instanceName ; $this ->BasePath= '../common/editor/' ; $this ->Width= '100%' ; $this ->Height= '400' ; $this ->ToolbarSet= 'Default' ; $this ->Value= '' ; $this ->Config= array (); } publicfunctionCreate() { echo $this ->CreateHtml(); } publicfunctionCreateHtml() { $HtmlValue =htmlspecialchars( $this ->Value); $Html = '' ; if ( $this ->IsCompatible()) { if (isset( $_GET [ 'fcksource' ])&& $_GET [ 'fcksource' ]== "true" ) $File = 'fckeditor.original.html' ; else $File = 'fckeditor.html' ; $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; if ( $this ->ToolbarSet!= '' ) $Link .= "&Toolbar={$this->ToolbarSet}" ; $Html .= "<inputtype=\"hidden\"id=\"{$this->InstanceName}\"name=\"{$this->InstanceName}\"value=\"{$HtmlValue}\"style=\"display:none\"/>" ; $Html .= "<inputtype=\"hidden\"id=\"{$this->InstanceName}___Config\"value=\"" . $this ->GetConfigFieldString(). "\"style=\"display:none\"/>" ; $Html .= "<iframeid=\"{$this->InstanceName}___Frame\"src=\"{$Link}\"width=\"{$this->Width}\"height=\"{$this->Height}\"frameborder=\"0\"scrolling=\"no\"></iframe>" ; } else { if ( strpos ( $this ->Width, '%' )===false) $WidthCSS = $this ->Width. 'px' ; else $WidthCSS = $this ->Width; if ( strpos ( $this ->Height, '%' )===false) $HeightCSS = $this ->Height. 'px' ; else $HeightCSS = $this ->Height; $Html .= "<textareaname=\"{$this->InstanceName}\"rows=\"4\"cols=\"40\"style=\"width:{$WidthCSS};height:{$HeightCSS}\">{$HtmlValue}</textarea>" ; } return $Html ; } publicfunctionIsCompatible() { returnFCKeditor_IsCompatibleBrowser(); } publicfunctionGetConfigFieldString() { $sParams = '' ; $bFirst =true; foreach ( $this ->Configas $sKey => $sValue ) { if ( $bFirst ==false) $sParams .= '&' ; else $bFirst =false; if ( $sValue ===true) $sParams .= $this ->EncodeConfig( $sKey ). '=true' ; elseif ( $sValue ===false) $sParams .= $this ->EncodeConfig( $sKey ). '=false' ; else $sParams .= $this ->EncodeConfig( $sKey ). '=' . $this ->EncodeConfig( $sValue ); } return $sParams ; } publicfunctionEncodeConfig( $valueToEncode ) { $chars = array ( '&' => '%26' , '=' => '%3D' , '"' => '%22' ); returnstrtr( $valueToEncode , $chars ); } } $editor =newFCKeditor( 'editor' ); //接收时$_POST['........']中的内容 $editor ->BasePath= "../common/editor/" ; //FCKEDITOR的路径 ?> |
1
2
3
4
5
6
7
8
9
|
<% DimoFCKeditor SetoFCKeditor=NewFCKeditor oFCKeditor.ToolbarSet= "A" ’使用工具条 oFCKeditor.Width= "100%" ’宽度 oFCKeditor.Height= "400" ’高度 oFCKeditor.Value=’源文件 oFCKeditor.Create "content" ’文本框名称 %> |
1
2
3
4
5
6
7
8
9
10
11
12
13
|
< servlet > < servlet-name >Connector</ servlet-name > < servlet-class > net.fckeditor.connector.ConnectorServlet </ servlet-class > < load-on-startup >1</ load-on-startup > </ servlet > < servlet-mapping > < servlet-name >Connector</ servlet-name > < url-pattern > /fckeditor/editor/filemanager/connectors/* </ url-pattern > </ servlet-mapping > |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%> <%@tagliburi="http://java.fckeditor.net"prefix="FCK"%> < html > < head > < title >FckEditor测试</ title > </ head > < bodystyle = "text-align:center;" > FckEditor测试 < hr > < formaction = "ShowData.jsp" method = "post" > < FCK:editorinstanceName = "test" height = "400pt" > </ jsp:attribute > </ FCK:editor > < inputtype = "submit" value = "提交" /> < inputtype = "reset" value = "重置" /> </ form > </ body > </ html > |
工具条编辑
CKEDITOR (FCKEDITOR) --- 目前最优秀的可见即可得网页编辑器之一的更多相关文章
- 在JSP中使用CKEditor网页编辑器
为了在我的一个项目使用CKEditor网页编辑器,我开始了寻找应用之法. 我下载了ckeditor_4.3.3_standard和ckeditor-java-core-3.5.3. 之前的版本和现在版 ...
- JQuery轻量级网页编辑器 选中即可编辑
目前流行的可视化网页编辑器非常多,像ckeditor.kindeditor.tinyeditor等,虽然功能都非常强大,但是体积都比 较庞大,使用起来也不是很方便.今天我们分享一款基于jQuery的轻 ...
- CKEditor图片上传问题(默认安装情况下编辑器无法处理图片),通过Base64编码字符串解决
准备做一个文章内容网站,网页编辑器采用CKEditor,第一次用,默认安装情况下,图片无法插入,提示没有定义上传适配器(adapter),错误码提示如下: 根据提示,在官网看到有两种途径:一使用CKE ...
- 【ASP.NET】:Ckeditor+Fckeditor的使用
首先这三个文件:下载ckeditor和ckeditor_aspnet_3.6.4和ckfinder 然后把这三个文件复制到项目根目录下 添加引用CKEditor.NET.dll CKFind ...
- 最优秀的5个Linux文本编辑器
from: http://article.yeeyan.org/view/169956/174836 作为不久前举办的比赛的一部分内容,我从那些选出他们最喜欢的Linux文本编辑器的极客读者们那获得了 ...
- Fckeditor PHP/ASP File Upload Vul
目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 FCKeditor是目前最优秀的可见即可得网页编辑器之一,它采用JavaScrip ...
- FCKeditor使用方法技术详解
转载自 http://www.cnblogs.com/cchyao/archive/2010/07/01/1769204.html 1.概述 FCKeditor是目前最优秀的可见即可得网页编辑器之一, ...
- [xPlugins] 开发中常用富文本编辑器介绍
富文本编辑器学习,常见富文本编辑器有: CKeditor(FCkeditor).UEditor(百度推出的).NicEdit.KindEditor CKEditor 即 FCKEditor FCKed ...
- CKEditor在线编辑器增加一个自定义插件
CKEditor是一个非常优秀的在线编辑器,它的前身就是FCKEditor,CKEditor据官方说是重写了内核的,但功能和性能比FCKEditor更为强大和优越.记得07年的时候第一次接触FCKEd ...
随机推荐
- 配置ssh免密登录遇到的问题——使用VMware多虚拟机搭建Hadoop集群
搭建环境: 虚拟机 VMware12Pro 操作系统 centos6.8 hadoop 1.2.1 1.导入镜像文件,添加java环境 1.查看当前系统中安装的java,ls ...
- bugku论剑场web解题记录
前言 国庆这几天感觉没什么好玩的地方,家又离的太远,弱鸡的我便决定刷刷题涨涨知识,于是就有了这篇文章.. 正文 写的不对的地方欢迎指正 web26 打开直接就是代码,这应该就是一道代码审计的题了 这里 ...
- MySQL逻辑分层介绍
上一篇文章主要介绍了MySQL在Ubuntu18.04系统上的安装,以及安装过程中可能会遇到的一些问题的解决方案. 在这篇文章里,开始介绍MySQL数据库的逻辑分层.通过本文的介绍,可以大致了解到My ...
- 基于arduino、百度云、采用django、redis鱼缸在线监控
大家好,今天我给大家分享一下之前做的一个鱼缸远程监控的案例,希望有人喜欢 首先给大家看一下结构框架,由于我之前买的arduino开发板不带wifi功能,所有是通过pc机转发一下上的百度云,最近我刚购买 ...
- 最小生成树(次小生成树)(最小生成树不唯一) 模板:Kruskal算法和 Prim算法
Kruskal模板:按照边权排序,开始从最小边生成树 #include<algorithm> #include<stdio.h> #include<string.h> ...
- 【springmvc thymeleaf】springmvc整合thymeleaf
概述 Thymeleaf提供了一组Spring集成,使您可以将其用作Spring MVC应用程序中JSP的全功能替代品. 这些集成将使您能够: @Controller像使用JSP一样,将Spring ...
- IOS 手动添加第三方库报错问题
当不想使用CocoaPods来管理和使用第三方库的时候,就需要手动添加和配置这些第三方库,难免会出现一些问题,主要问题汇总如下: 1.AFNetworking.NKNetWork.ZxingObjC等 ...
- Ubuntu在Anaconda中安装TensorFlow GPU,Keras,Pytorch
安装TensorFlow GPU pip install --ignore-installed --upgrade tensorflow-gpu 安装测试: $ source activate tf ...
- [codevs1036]商务旅行<LCA:tarjan&倍增>
题目链接:http://codevs.cn/problem/1036/ 今天翻箱倒柜的把这题翻出来做了,以前做的时候没怎么理解,所以今天来重做一下 这题是一个LCA裸题,基本上就把另一道裸题小机房的树 ...
- 8.MSFvenom
Meterpreter 01 Meterpreter API调用 Meterpreter提供了多种APl调用,在编写自己的脚本时可以使用这些API来提供额外功能或定制功能. 关于ruby的更多信息,请 ...