eWebEditor首页 >> eWebEditor帮助文档 V15.2 >> 开发手册 >> 集成调用

3.3.3 弹窗调用

v2.7.5版本后加入了弹窗调用功能,能实现通过一个链接弹窗打开编辑器,并将编辑的内容保存入指定的表单域。

eWebEditor根目录下文件名为popup.htm,提供的接口传入参数如下:(V7.0版更新接口)

l   style : 样式名

l   link : 要返回或设置值的表单项textarea

 

调用形式如:

/ewebeditor/popup.htm?style=coolblue&link=myLink

 

使用例子如下:

<HTML>

<BODY>

<script type="text/javascript">

function eWebEditorPopUp(style, link, width, height) {

     window.open("../popup.htm?style="+style+"&link="+link, "", "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");

}

</script>

<FORM ACTION="" METHOD="" NAME="myForm">

<TEXTAREA NAME="content1" COLS="50" ROWS="5"></TEXTAREA>

<INPUT TYPE="BUTTON" VALUE="HTML Editor" ONCLICK="eWebEditorPopUp('popup', 'content1', 580, 380)">

</FORM>

</BODY>

</HTML>