3.3.1 标准调用
要把eWebEditor集成到你原有的web应用系统中,你基本只需在原来的代码上,再加上一行如下形式的代码即可。
|
<iframe
ID="eWebEditor1"
src="/ewebeditor.htm?id=content1&style=coolblue"
frameborder="0" scrolling="no" width="500"
HEIGHT="350"></iframe>
|
参数说明:
l
/ewebeditor.htm应改为你实际安装的路径
l
参数id: 相关联的表单项名,也就是提交保存页要引用的表单项名,多个调用时,请保证id不同,可参见后面例子
l
参数style: 使用的样式名,可以是标准的样式名或自定义的样式名,如果使用标准coolblue可留空
l
width, height: 根据实际需要设置,eWebEditor将自动调整与其适应
l
在后台管理中,可以得到每个样式的最佳调用代码
l
更多参数,请见参数设置说明
例子:新增表单
在未使用eWebEditor前,你原来新增内容的表单可能是如下形式:
|
<textarea name="content1"
rows=10 cols=50></textarea>
|
使用eWebEditor后,现在是如下形式:
|
<input
type="hidden" name="content1" value="">
<iframe
ID="eWebEditor1"
src="/ewebeditor.htm?id=content1&style=coolblue"
frameborder="0" scrolling="no" width="500"
HEIGHT="350"></iframe>
|
或者
|
<textarea
name="content1" style="display:none"></textarea>
<iframe
ID="eWebEditor1"
src="/ewebeditor.htm?id=content1&style=coolblue"
frameborder="0" scrolling="no" width="500"
HEIGHT="350"></iframe>
|
例子:修改表单
你原来可能是:
|
<textarea name="content1" rows=10
cols=50><%=Server.HTMLEncode(s_Content)%></textarea>
|
现在是:
|
<input
type="hidden" name="content1"
value="<%=Server.HTMLEncode((s_Content)%>">
<iframe ID="eWebEditor1"
src="/ewebeditor.htm?id=content1&style=coolblue"
frameborder="0" scrolling="no" width="500"
HEIGHT="350"></iframe>
|
或者
|
<textarea
name="content1"
style="display:none"><%=Server.HTMLEncode((s_Content)%></textarea>
<iframe ID="eWebEditor1"
src="/ewebeditor.htm?id=content1&style=coolblue"
frameborder="0" scrolling="no" width="500"
HEIGHT="350"></iframe>
|
|