fckeditor问题
时间:2011-08-03
来源:互联网
fckeditor 添加文章时自动会加文章后面添加,
如:<p>111111,</p>如何解决
补充一下:
<!--#include file="../../fckeditor/fckeditor.asp"--> 这个页被我用gb2312重新载入了,不然我添加时就是乱码。
如:<p>111111,</p>如何解决
补充一下:
<!--#include file="../../fckeditor/fckeditor.asp"--> 这个页被我用gb2312重新载入了,不然我添加时就是乱码。
作者: aiyoucn 发布时间: 2011-08-03
问】使用FCKeditor添加文章时,在文章最后多了逗号。
【答】此情况发生在asp环境中。在asp里对于 提交的表单信息中如果有相同name属性的键值对 做‘逗号连接处理’ 你们一定是使用了这样的js方法建立了编辑器
var oFCKeditor = new FCKeditor( ’editor’ ) ;
oFCoFCKeditor.Create() ;
然后 又在同一个表单里面 添加了 一个id="editor" 或者 name ="editor"的 文本域
造成的!这样的话载入以后,实际上存在了两个 名称为editor表单控件了 所以在提交更新的时候,浏览器会出现逗号。
解决的方法是:第一种:不要在表单里面 添加 多余的 名为 editor 的文本域了
第二种:使用 fckeditor 的ReplaceTextarea()方法 :
window.onload = function()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.ReplaceTextarea() ;
}
具体的可以看 fckeditor的实例中的html实例第二个
【答】此情况发生在asp环境中。在asp里对于 提交的表单信息中如果有相同name属性的键值对 做‘逗号连接处理’ 你们一定是使用了这样的js方法建立了编辑器
var oFCKeditor = new FCKeditor( ’editor’ ) ;
oFCoFCKeditor.Create() ;
然后 又在同一个表单里面 添加了 一个id="editor" 或者 name ="editor"的 文本域
造成的!这样的话载入以后,实际上存在了两个 名称为editor表单控件了 所以在提交更新的时候,浏览器会出现逗号。
解决的方法是:第一种:不要在表单里面 添加 多余的 名为 editor 的文本域了
第二种:使用 fckeditor 的ReplaceTextarea()方法 :
window.onload = function()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.ReplaceTextarea() ;
}
具体的可以看 fckeditor的实例中的html实例第二个
作者: hongmei85 发布时间: 2011-08-03
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28