<html>
<head>
<script type="text/javascript" src="__PUBLIC__/baiduedit/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/baiduedit/ueditor.all.js"></script>
<script src="jquery.min.js"></script>
</head>
<body>
<script type="text/plain" id="j_ueditorupload" style="height:5px;display:none;" ></script>
<script>
//实例化编辑器
var o_ueditorupload = UE.getEditor('j_ueditorupload',
{
autoHeightEnabled:false
});
o_ueditorupload.ready(function ()
{
o_ueditorupload.hide();//隐藏编辑器
//监听图片上传
o_ueditorupload.addListener('beforeInsertImage', function (t,arg)
{
$pp = (arg[0].src);
$("#src").attr("src",$pp);
});
});
//弹出图片上传的对话框
function upImage()
{
var myImage = o_ueditorupload.getDialog("insertimage");
myImage.open();
}
</script>
<button type="button" onClick="upImage()">调用上传图片模块</button>
<div id="test"><img width="200px" id="src"/></div>
</body>
<html>