dwz和 kindeditor整合的问题

开发一个新项目需要用到dwz

但是dwz的编辑器太8888了所以想着整合一下kindeditor

网上查了一下.

最后改动一下

搞出一个稍微完善的方案

$("textarea.kindeditor", $p).each(function () {
        $this = $(this);
        var tools = $this.attr(‘tools‘);
        var items;
        if(tools==‘smple‘){
  
         items = [‘undo‘, ‘redo‘, ‘|‘, ‘justifycenter‘,
‘justifyright‘,‘justifyfull‘, ‘indent‘, ‘outdent‘,‘bold‘,‘italic‘,
‘underline‘, ‘strikethrough‘, ‘removeformat‘];
        }else if(tools==‘full‘){
            items = [‘source‘, ‘|‘, ‘undo‘, ‘redo‘, ‘|‘, ‘preview‘, ‘print‘, ‘template‘, ‘code‘, ‘cut‘, ‘copy‘, ‘paste‘,
  
     ‘plainpaste‘, ‘wordpaste‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘,
‘justifyright‘,‘justifyfull‘, ‘insertorderedlist‘,
‘insertunorderedlist‘, ‘indent‘, ‘outdent‘, ‘subscript‘,‘superscript‘,
‘clearhtml‘, ‘quickformat‘, ‘selectall‘, ‘|‘, ‘fullscreen‘,
‘/‘,‘formatblock‘, ‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘,
‘hilitecolor‘, ‘bold‘,‘italic‘, ‘underline‘, ‘strikethrough‘,
‘lineheight‘, ‘removeformat‘, ‘|‘, ‘image‘, ‘multiimage‘,
        ‘flash‘, ‘media‘, ‘insertfile‘, ‘table‘, ‘hr‘, ‘emoticons‘, ‘baidumap‘,‘anchor‘, ‘link‘, ‘unlink‘];
        }else if(tools==‘basic‘){
  
         items = [‘source‘, ‘|‘, ‘undo‘, ‘redo‘, ‘|‘, ‘plainpaste‘,
‘wordpaste‘, ‘|‘, ‘justifycenter‘, ‘justifyright‘,‘justifyfull‘,
‘indent‘, ‘outdent‘,‘clearhtml‘, ‘quickformat‘, ‘|‘,‘formatblock‘,
‘fontname‘, ‘fontsize‘, ‘|‘, ‘forecolor‘, ‘hilitecolor‘,
‘bold‘,‘italic‘, ‘underline‘, ‘strikethrough‘, ‘lineheight‘,
‘removeformat‘,‘image‘, ‘multiimage‘, ‘link‘, ‘unlink‘, ‘fullscreen‘];
        }else if(tools==‘copyright‘){
  
         items = [‘source‘,‘undo‘, ‘redo‘, ‘|‘, ‘justifycenter‘,
‘justifyright‘,‘justifyfull‘, ‘indent‘, ‘outdent‘, ‘forecolor‘,
‘bold‘,‘italic‘,‘removeformat‘];
        }
        $.getScript(‘data/static/kindeditor/kindeditor-min.js‘, function () {
            KindEditor.basePath = ‘data/static/kindeditor/‘;
            var editor = KindEditor.create(‘.kindeditor‘, {
                uploadJson: ‘data/static/kindeditor/php/upload_json.php‘,
                fileManagerJson: ‘data/static/kindeditor/php/file_manager_json.php‘,
                allowFileManager: true,
                items : items,
                afterBlur: function () { editor.sync(); },
            });
        });
    });

dwz和 kindeditor整合的问题

时间: 2024-07-30 06:20:31

dwz和 kindeditor整合的问题的相关文章

DWZ与KindEditor编辑器的整合

原文:DWZ与KindEditor编辑器的整合 DWZ自带的编辑器是xheditor,可能很多人用不习惯.就像我,习惯用kindeditor了.现在就来说说如何整合dwz和kindeditor. 一.打开DWZ的中的dwz.ui.js,进行修改. 首先找到 if ($.fn.xheditor) { $("textarea.editor", $p).each(function(){ var $this = $(this); var op = {html5Upload:false, ski

在DWZ框架中整合kindeditor复文本框控件

今天上午在DWZ框架中整合kindeditor复文本框控件,发现上传图片是老是提示 “上传中,请稍候...”,上网查看别人说可能是文件路径问题,在想以前在其他项目中用这个控件一直没问题,到这里怎么会出现这个错误呢? 于是从源头一路查找过去, 找到上传配置 uploadJson: '/Scripts/kindeditor-4.1.4/asp.net/upload_json.ashx',于是打开上传文件的upload_json.ashx文件,发现context.Response.Write(Json

spring mvc 与 kindeditor 整合

当使用spring mvc 框架,再去使用kindeditor会出现上传错误.纠起原因是upload.parseRequest(request)取值的老是NULL.因为此时取得的request是DefaultMultipartHttpServletRequest 类型.原来处理上传图片的upload_json.jsp文件无法使用了,于是对kindeditor中处理上传图片的upload_json.jsp文件进行重写.一下是重写后的upload_json.jsp文件. <%@ page langu

cakephp下整合kindeditor和ckplayer

1.放入图片\cakephp\webroot\js\kindeditor\themes\2.修改样式表\cakephp\webroot\js\kindeditor\themes\default.css 443行 加/*插入视频*/.ke-icon-insertVideo {    background: url(ckplayer.png) 0px 0px;    width: 16px;    height: 16px;}3.修改文件zh_CN.js 129行 加     insertVideo

nodejs+express整合kindEditor实现图片上传

kindEditor官网上中提供了ASP,ASP.NET,JSP相关的整合应用,http://kindeditor.net/docs/upload.html可以参照实现nodejs的整合,发现实用nodejs更简单 环境: unbuntu 14.10 nodejs 0.10.35 express 4.11.2 formidable 1.0.16 kindEditor 4.1.10 webStorm 8 1.通过IDE或终端创建一个名称为test的工程 2.编辑package.json添加form

学习笔记:以友好的方式整合DWZ

以友好的方式整合DWZ http://jnoee.iteye.com/blog/1447826

Springsecurity+DWZ+SSH整合

项目用了DWZ,和SSH, 当有同一账户在不同客户端登录时该如何在项目上做修改使得项目能结合DWZ弹出超时,跳转到登录页面呢, 我是用了struts的拦截器 先自定义一个拦截器, 代码如下. 先在开头定义一个hashmap 这个hashmap的作用主要在于每次登录时记录登录的session,因为每个客户端登录过后的session是不一样的,所以在其他客户端有登录了同样的账号的时候,最先登录的那个客户端在执行其他动作的时候就会进行判断,然后根据session不同来弹出超时对话框. Springse

电子商务系统的设计与实现(十):DWZ框架与第三方分页组件整合

晚上,就是刚刚,在后端管理系统中使用DWZ框架. 先是,直接使用官网网站的Demo,dwz-jui,与编程语言无关的纯静态的那个原始项目. 很快就搭建好了左侧菜单,打开菜单后,出现Tab页面,然后显示目标页面的内容. 然后,就去关注表格分页部分. DWZ自带的分页组件,感觉太麻烦了,一方面分页分成了4个部分显示,主要包括:pagerForm,查询条件pagerHeader,分页表格的头部pagerContent,分页表格的正文panleBar,分页条数栏目. 另一方面,分页html和JS中,需要

MVC与DWZ整合中部分问题的解决

1.错误提示距离太远 2.正确与错误时返回JSON(即:如何不出现打开新页显示JSON字串) 3.打开新页后“数据加载中,请稍候”关不掉 4.如何正常的分页,同时如果有查询结果时分页也要有效 5.关闭弹出的对话框后出现半透明黑色框 6.DWZ使用<input type="file">上传文件返回JSON串IE无法解析问题 上传的页面的form中如果加上onsubmit = "return validateCallback(this, dialogAjaxDone)