关于KindEditor编辑器,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.1. 集成到KindEditor3.x

主要步骤如下:

1.上传WordPaster文件夹

 

2.在引用页面为KindEditor增加插件按钮

<html xmlns=”[url]http://www.w3.org/1999/xhtml”[/url] >

<head>

    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

    <link type=”text/css” rel=”Stylesheet” href=”WordPaster/css/WordPaster.css”/>

    <link type=”text/css” rel=”Stylesheet” href=”WordPaster/js/skygqbox.css” />

    <script type=”text/javascript” src=”kindeditor-min.js” charset=”utf-8″></script>

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

    <script type=”text/javascript” src=”WordPaster/js/jquery-1.4.min.js” charset=”utf-8″></script>

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

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

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

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

    <script type=”text/javascript” src=”WordPaster/js/skygqbox.js” charset=”utf-8″></script>

</head>

<body>

     <textarea id=”content1″ name=”content1″ style=”width:700px;height:300px;visibility:hidden;“></textarea>

     <script type=”text/javascript”>

        var pasterMgr = new WordPasterManager();

         pasterMgr.Config[“PostUrl“] = “http://localhost:1465/asp.net/upload.aspx”;

         pasterMgr.Load();

 

         //加载kindeditor

         KE.show({

              id: ‘content1’

              ,imageUploadJson : ‘../../asp.net/upload_json.ashx’

              ,fileManagerJson : ‘../../asp.net/file_manager_json.ashx’

              ,allowFileManager : true

              , cssPath: ‘./index.css’

              , items: [‘source’‘|’‘fullscreen’‘undo’‘redo’‘print’‘cut’‘copy’‘paste’,

‘plainpaste’‘wordpaste’‘imagepaster’,‘netpaster’,‘|’‘justifyleft’‘justifycenter’‘justifyright’,

‘justifyfull’‘insertorderedlist’‘insertunorderedlist’‘indent’‘outdent’‘subscript’,

‘superscript’‘|’‘selectall’‘-‘,

‘title’‘fontname’‘fontsize’‘|’‘textcolor’‘bgcolor’‘bold’,

‘italic’‘underline’‘strikethrough’‘removeformat’‘|’‘image’,

‘flash’‘media’‘advtable’‘hr’’emoticons’‘link’‘unlink’‘|’‘about’]

              , afterCreate: function(id)

              {

                   //初始化

                  pasterMgr.SetEditorID(id);

              }

         });

     </script>

</body>

</html>

 

说明:

WordPasterManager必须申明成全局变量

 

 

常见问题:

1.为什么整合到项目中图片无法上传?

可能原因:可能上传页面有登陆验证,上传时没有添加SESSION信息,导致上传失败。可在上传页面增加SESSION参数。