資訊動(dòng)態(tài)

ASP版最新FCKEditor編輯器的使用方法

日期:2015-01-04 作者:管理員 來(lái)源:本站

ASP版最新FCKEditor編輯器的使用方法

第一步,首先要下載FCKEditor編輯器源代碼

去百度搜索,到FCKEditor編輯器官方網(wǎng)站下載,下載完FCKEditor后解壓并上傳到你網(wǎng)站的目錄,最好就放在根目錄下,文件夾名字就用FCKEditor;這里可以隨便自己喜好。

第二步,在網(wǎng)站的后臺(tái)頁(yè)面里引用

首先引用FCKEditor:在你的頁(yè)面里加入<!-- #include file="FCKeditor/fckeditor.asp" -->
然后在你頁(yè)面中想要它顯示的地方加入以下代碼:

<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%>

這段的作用就是初始加載FCKeditor編輯器。這段網(wǎng)上都有注解,可以去搜索。

到此,你就已經(jīng)添加成功,你的頁(yè)面中就已經(jīng)出現(xiàn)編輯器了。

如何把FCKeditor的內(nèi)容保存到數(shù)據(jù)庫(kù),如何把數(shù)據(jù)庫(kù)里的數(shù)據(jù)顯示在FCKeditor中,我想這是多數(shù)初用者最想知道的。請(qǐng)看上面引用代碼中的這一句:oFCKeditor.Create "logbody" 這里的logbody就代表你的FCKeditor,你也可以用其它的名字。

怎么使用呢,我是這樣做的:用一個(gè)表單把它裝起來(lái),然后就和文本框一樣使用了,如:

<form action="save.asp" method="post">
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%>
</form>

然后在save.asp里讀?。簍ext=request("logbody"),這里的text就是你要的內(nèi)容,把他把存到數(shù)據(jù)庫(kù)中就OK。把數(shù)據(jù)庫(kù)里的內(nèi)容顯示在FCKeditor中就在引用代碼中給這句賦值oFCKeditor.Value = ""

資料整理:珠海網(wǎng)站建設(shè)網(wǎng) http://yngytx.cn 轉(zhuǎn)載時(shí)請(qǐng)注意標(biāo)明來(lái)源。

二維碼
掃二維碼手機(jī)查看該文章
當(dāng)前網(wǎng)址:http://yngytx.cn/webseo/98.html

相關(guān)資訊

?
Copyright ? 2007-2024 珠海市網(wǎng)訊互聯(lián)信息科技有限公司 yngytx.cn 版權(quán)所有
粵公網(wǎng)安備44040202000391號(hào) 粵ICP備19117377號(hào) 網(wǎng)站地圖 站點(diǎn)地圖
在線客服