下載eWebEditor 到網(wǎng)站的 /eWebEditor 下面
在要添加的地方加上:
<input name="content" type="hidden" value="">
<IFRAME ID="eWebEditor1" src="eWebEditor/ewebeditor.asp?
id=content&style=standard" frameborder="0" scrolling="no" width="550"
height="350"></IFRAME >
接收數(shù)據(jù)的頁(yè)面:
For i = 1 To Request.Form("content").Count
content = content & Request.Form("content")(i)
Next
<iframe id="eWebEditor1" src="../edit/ewebeditor.php?id=content"
frameborder="0" scrolling="No" width="550" height="350"></iframe>
<input name="content" type="hidden" id="content" />
每個(gè)iframe是一個(gè)eWebeditor編輯器,src是eWebeditor編輯器所在的相對(duì)目錄。?
id=content和下面的<input name="content" type="hidden" id="content" />要對(duì)應(yīng)
。
1.登陸后臺(tái)Admin_Login.asp,進(jìn)入樣式管理-->管理-->點(diǎn)“代碼”(你想要的樣式)-->
復(fù)制樣式代碼
2.將復(fù)制的代碼粘貼到你所要ewebeditor出現(xiàn)的位置,更改路徑和id即可。
以下是我自己測(cè)試過(guò)的,可以用
<!--#include file="../eWebEditor/Include/DeCode.asp"-->
<table width="500" height="300" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="" onSubmit="">
<tr>
<td><textarea name="newText" id="newText" style="width:0px; height:0px;
"></textarea>
<IFRAME ID="eWebEditor1" SRC="../eWebEditor/ewebeditor.asp?
id=newText&style=standard" FRAMEBORDER="0" SCROLLING="no"
WIDTH="550" HEIGHT="350"></IFRAME>
</td>
</tr>
</form>
</table>
____________________________________________________
3.3.4 注意事項(xiàng)
1. 調(diào)用參數(shù)id與表單項(xiàng)名必須相同
如,下面的代碼中,藍(lán)色部分必需是相同的,且區(qū)分大小寫(xiě)。
<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>
2. eWebEditor允許在同一表單里有多個(gè)實(shí)例,所以請(qǐng)保證id在整個(gè)網(wǎng)頁(yè)中是唯一的
。
如:
<form>
<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>
<input type="hidden" name="content2" value="">
<iframe ID="eWebEditor2" src="/ewebeditor.htm?id=content2&style=coolblue"
frameborder="0" scrolling="no" width="500" height="350"></iframe>
</form>
3. 在使用<textarea>作為原表單項(xiàng)時(shí),要加入style="display:none"
<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>
4. 當(dāng)使用<input>形式做為修改表單時(shí),一定要用雙引號(hào),不能用單引號(hào),且要加
HTMLEncode函數(shù),否則有可能內(nèi)容被截掉。
例如:
(ASP代碼)
<input type=hidden name="content1" value="<%=Server.HTMLEncode(str)%>">
或
<textarea name="content1" style="display:none"><%=Server.HTMLEncode
(str)%></textarea>
(PHP代碼)
<input type=hidden name="content1" value="<?=htmlspecialchars($str)?>">
或
<textarea name="content1" style="display:none"><%=htmlspecialchars($str)%
></textarea>
______________________________________________
用asp,將access庫(kù)中的新聞內(nèi)容顯示到編程器中,如何實(shí)現(xiàn)
<textarea name="foreground" style="display:none"><%=Server.HTMLEncode(rs
("foreground"))%></textarea>
<iframe ID="eWebEditor1" src="eWebEditor/ewebeditor.htm?
id=foreground&style=3d" frameborder="0" scrolling="no" width="650"
HEIGHT="320"></iframe>