wangeditor 粘贴word内容带样式

版权所有 2009-2019 荆门泽优软件有限公司

保留所有权利

官方网站:http://www.ncmem.com/index.aspx

产品首页:http://www.ncmem.com/webapp/wordpaster/index.aspx

开发文档:http://www.ncmem.com/doc/view.aspx?id=29adc89a08ed489498160458cddfa51b

控件下载:http://www.ncmem.com/webapp/wordpaster/pack.aspx

示例下载:http://www.ncmem.com/webapp/wordpaster/versions.aspx

联系信箱:1085617561@qq.com

联系QQ:1085617561

产品交流群:泽优Word一键粘贴控件
扫码加群:
     

项目

1.复制WordPaster目录

2.复制文件上传页面

upload.jsp

/src/Xproer/Uploader.java

 

编辑器页面:

1.引入头和样式

<head>

     <metahttp-equiv=“Content-Type” content=“text/html; charset=utf-8” />

    <title>WordPaster form wangEditor</title>

    <scripttype=“text/javascript” src=“WordPaster/js/json2.min.js” charset=“utf-8”></script>

    <scripttype=“text/javascript” src=WordPaster/js/jquery-1.9.1.min.js” charset=“utf-8”></script>

     <scripttype=“text/javascript” src=“wangEditor.min.js”></script>

    <linktype=“text/css” rel=“Stylesheet” href=“WordPaster/css/WordPaster.css”/>

    <scripttype=“text/javascript” src=“WordPaster/layer/layer.js” charset=“utf-8”></script>

    <scripttype=“text/javascript” src=“WordPaster/js/w.edge.js” charset=“utf-8”></script>

    <scripttype=“text/javascript” src=“WordPaster/js/w.app.js” charset=“utf-8”></script>

    <scripttype=“text/javascript” src=“WordPaster/js/w.file.js” charset=“utf-8”></script>

     <scripttype=“text/javascript” src=“WordPaster/js/WordPaster.js” charset=“utf-8”></script>

     <scripttype=“text/javascript” src=“WordPaster/js/wang.js” charset=“utf-8”></script>

     <styletype=“text/css”>

         .wordpaster{backgroundtransparent url(WordPaster/word.png) no-repeat;

              width16px !important;

              height16px !important;

              margin:2px 0 0 0;

              z-index9999;}

         .netpaster{backgroundtransparent url(WordPaster/ico.png) no-repeatbackground-position:3px 2px;}

     </style>

</head>

 

2.初始化插件和编辑器

     <scripttype=“text/javascript” language=“javascript”>

         var pasterMgr = new WordPasterManager();

         pasterMgr.Config[“PostUrl”] = “http://localhost:8080/WordPaster2WangEditor/upload.jsp”;

         pasterMgr.Config[“Cookie”] = ‘<%=clientCookie%>‘;

         pasterMgr.Load(); //加载控件

        

        var E = window.wangEditor

        var edt = new E(‘#editor’)

        edt.customConfig.zIndex = 100

        edt.create();

        pasterMgr.SetEditor(edt);//配置编辑器

        E.wordpaster.init(‘#editor’);//初始化wangEditor插件

     </script>

 

整合后的效果: