日期:2014-05-17  浏览次数:21164 次

关于嵌入框架和编辑器的问题

发布信息的页面(实现图文混排的功能):
<script   language= "javascript ">
function   CheckForm(){
document.form1.content.value=frames[ 'doc_html '].document.frames[ 'Composition '].document.body.innerHTML;
……
</script>
<form   id= "form1 "   name= "form1 "   method= "post "   action= " "onSubmit= "return   CheckForm() ">
……
<IFRAME   SRC= "editor.htm "   id= "doc_html "   name= "doc_html "   align= "left "     width= "100% "   height= "400 "> </IFRAME> ***此处放编辑器,可以放图片和文字
……
</form>

editor.htm   里的嵌入框架内容: <iframe   class= "Composition "   ID= "Composition "   MARGINHEIGHT= "1 "   MARGINWIDTH= "1 "   width= "100% "   height= "290 ">
</iframe> 我想应该是在这放,可是怎么放呢?


发布没有任何问题,就是在修改的时候,我如何实现把要修改的内容(含有图片和文字)放入我的form表单里面???然后对信息进行修改
编辑器很少用,这个问题很麻烦,请大家帮帮忙……
目前修改的时候很麻烦,我只能是像发布一样了,不过是只能提取修改的id号,无法
实现内容(含有图片和文字)在修改页面显示……


------解决方案--------------------
ewebeditor就有一整套的解决方案,楼上到官方站上看看吧。
------解决方案--------------------
有时候不想改也得改啊.
------解决方案--------------------
<script language= "javascript ">
function CheckForm(){
document.form1.content.value=frames[ 'doc_html '].document.frames[ 'Composition '].document.body.innerHTML;
……
}

function setData()
{
document.form1.doc_html.value = document.form1.cont.value
return true
}

function clearContent()
{
document.form1.doc_html.value = " ";
}
</script>

<form>
<object id=doc_html style= "LEFT: 0px; TOP: 0px " data=editor/editor.htm width=544 height=320 type= "text/x-scriptlet " viewastext> </object>
<textarea style= "display:none " name= "cont ">
<%=c%>
</textarea>
<input type= "hidden " name= "content " value= " " >
</form>

和你的有些不同,看着改改就行了