`
chilongxph
  • 浏览: 135569 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

ewebeditor在线编辑器jsp

阅读更多
1. 精简版,在ASP、PHP、JSP、ASP.NET四个平台通用。
   注意:默认为asp平台下使用,如在其它平台下使用,请用记事本打开ewebeditor.htm文件,按如下方法修改保存即可。
   config.ServerExt = "asp";
   改为
   config.ServerExt = "php";
   或
   config.ServerExt = "jsp";
   或
   config.ServerExt = "aspx";

2. 自带10个样式,样式名分别为:coolblue、3d、blue、gray、light、mini、popup、red、yellow。
   您可以使用如下的方法分别调用不同的样式,示例:
   <iframe ID="eWebEditor1" src="/ewebeditor.htm?id=content1&style=coolblue" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>

参数说明:

/ewebeditor.htm应改为你实际安装的路径
参数id:相关联的表单项名,也就是提交保存页要引用的表单项名,多个调用时,请保证id不同,可参见后面例子
参数style:使用的样式名,可以是标准的样式名或自定义的样式名,如果使用标准standard可留空
width,height:根据实际需要设置,eWebEditor将自动调整与其适应
在后台管理中,可以得到每个样式的最佳调用代码

所有入口参数:(即:ewebeditor.htm?后面的参数)

id:相关联的保存编辑内容的表单项名,也就是提交保存页要引用的表单项名
style:使用的样式名,可以是标准的样式名或自定义的样式名,如果使用标准standard可留空
originalfilename:相关联的保存上传原文件名列表的表单项名,必须是input类型,可以带onchange事件[例子]
savefilename:相关联的保存上传保存文件名列表的表单项名,必须是input类型,可以带onchange事件[例子]
savepathfilename:相关联的保存上传保存文件名(带路径)列表的表单项名,必须是input类型,可以带onchange

[size=medium]3.调用示例[/size]

原本所用的应该是:<html:textarea property="ctxt" cols="48" rows="10" ></textarea>

现在改为;
<td colspan="2">
      <html:textarea property="ctxt" cols="48" rows="10" style="display:none"></html:textarea>
  <iframe ID="eWebEditor1" src="eWebEditor_V4.60/ewebeditor.htm?id=ctxt&style=yellow" frameborder="0" scrolling="no" width="600" HEIGHT="350"></iframe> 
  </td>

注意:property="ctxt"&id=ctxt此处二者的值必须相同

修改表单

你原来可能是:

<textarea name="content1" rows=10 cols=50><%=Server.HTMLEncode(oRs("D_Content"))%></textarea>

现在是:

<input type="hidden" name="content1" value="<%=Server.HTMLEncode(oRs("D_Content"))%>">
<iframe ID="eWebEditor1" src="/ewebeditor.asp?id=content1&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
或者

<textarea name="content1" style="display:none"><%=Server.HTMLEncode(oRs("D_Content"))%></textarea>
<iframe ID="eWebEditor1" src="/ewebeditor.asp?id=content1&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>

注意事项:

eWebEditor允许在同一表单里有多个,但请保证id在整个网页中是唯一的。即如果已经用了input name=content1第二个调用就要input name=content2之类的。
在使用textarea作为原表单项时,要加入style="display:none"。
在input修改时一定要用value="",而不是value=''。
一定要在动态加入value值时用Server.HTMLEncode()进行处理,否则有可能内容被截掉。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics