在线编辑器

系统 1133 0
把把那個Iframe 的id

  和你一個輸入框的id 一樣就行了...

如果不清楚

請看以下代碼
-----------------------------------------------------------------------------------------------------------------
调用:

eWebEditor的调用是非常简单,基本上只是在原来的使用中加入一行代码。

标准调用:

<iframe ID="eWebEditor1" src="/ewebeditor.asp?id=content1&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
参数说明:
/ewebeditor.asp应改为你实际安装的路径
参数id:相关联的表单项名,也就是提交保存页要引用的表单项名,多个调用时,请保证id不同,可参见后面例子
参数style:使用的样式名,可以是标准的样式名或自定义的样式名,如果使用标准standard可留空
width,height:根据实际需要设置,eWebEditor将自动调整与其适应
在后台管理中,可以得到每个样式的最佳调用代码
所有入口参数:(即:eWebEditor.asp?后面的参数)
id:相关联的保存编辑内容的表单项名,也就是提交保存页要引用的表单项名
style:使用的样式名,可以是标准的样式名或自定义的样式名,如果使用标准standard可留空
originalfilename:相关联的保存上传原文件名列表的表单项名,必须是input类型,可以带onchange事件[例子]
savefilename:相关联的保存上传保存文件名列表的表单项名,必须是input类型,可以带onchange事件[例子]
savepathfilename:相关联的保存上传保存文件名(带路径)列表的表单项名,必须是input类型,可以带onchange事件[例子]
例子:新增表单

你原来可能是:

<textarea name="content1" rows=10 cols=50></textarea>
现在是:

<input type="hidden" name="content1" value="">
<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"></textarea>
<iframe ID="eWebEditor1" src="/ewebeditor.asp?id=content1&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
例子:修改表单

你原来可能是:

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

现在是:
请问各位有谁用过ewebeditor在线编辑器吗,为什么在改代码后总是不能提交呢。能编辑,就是不能提交,改了跟没改一样。

<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()进行处理,否则有可能内容被截掉。

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

在线编辑器


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论