请问您是怎么把文本编辑器的内容存进数据库的啊

请问您是怎么把文本编辑器的内容存进数据库的啊,第1张

<script type="text/javascript" src="../Jeditor/fckeditor.js"></script>

<script type="text/javascript">

window.onload = function(){

var sBasePath = '../Jeditor/'

var oFCKeditor = new FCKeditor('content')

oFCKeditor.Height='300px'

oFCKeditor.BasePath= sBasePath

oFCKeditor.ReplaceTextarea()

}

</script>

<textarea name="content" style="width:100%"></textarea>

fck是实例化以后把内容存入到表单元素里的content文本域里,直接获取表单元素里的content内容就可以了.

<INPUT type="hidden" name="content1" value="">

<IFRAME ID="eWebEditor1" SRC="edit/ewebeditor.asp?id=content1&style=system" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>

input隐藏字段content1,与之对应:

edit/ewebeditor.asp?id=content&style=system中的

id要和input中的名字相同,也为content1

那么,提交后提取内容就用

Request("content1") 就可以了。

src 是你的“ewebeditor”文件夹实际的路径,style是样式,可以有多种选择

在进入action后,接收,保存即可

另外就是一般使用fck搭配的是数据库中的clob字段

在存储的时候使用下面的语句:

sql

=

"select

content

from

数据库名称

for

update"

rs

=

DbQuery(sql)

rs.getClob("CLOB")

OracleThinClob

clobComment

=

null

if

(rs.next())

{

clobComment

=

(OracleThinClob)

rs.getClob("content")

}

Writer

w

=

clobComment.getCharacterOutputStream()

w.write(用于接收内容的属性)

w.flush()

w.close()


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/9608758.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-30
下一篇2023-04-30

发表评论

登录后才能评论

评论列表(0条)

    保存