KindEditor编辑器初始化和单按钮上传控件
来源:互联网 发布:python pyqt5安装包 编辑:程序博客网 时间:2024/04/29 23:47
//初始化kindeditor编辑器
//selector 为容器function kindeditor(selector) {var editor;KindEditor.ready(function(K) {editor = K.create("#"+selector, {uploadJson:'/aaa.php?m=Attachment&a=upload',allowImageUpload:true,designMode : true,fullscreenMode : false,filterMode : true,wellFormatMode : true,shadowMode : true,loadStyleMode : true,basePath : K.basePath,themesPath : K.basePath + 'themes/',langPath : K.basePath + 'lang/',pluginsPath : K.basePath + 'plugins/',themeType : 'default',langType : 'zh_CN',urlType : '',newlineTag : 'p',resizeType : 2,syncType : 'form',pasteType : 2,dialogAlignType : 'page',useContextmenu : true,fullscreenShortcut : false,bodyClass : 'ke-content',indentChar : '\t',cssPath : '',cssData : '',width:700,minWidth : 650,minHeight : 100,minChangeSize : 50,zIndex : 811213,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', 'pagebreak','anchor', 'link', 'unlink', '|', 'about'],noDisableItems : ['source', 'fullscreen'],colorTable : [['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'],['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'],['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']],fontSizeTable : ['9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px'],htmlTags : {font : ['id', 'class', 'color', 'size', 'face', '.background-color'],span : ['id', 'class', '.color', '.background-color', '.font-size', '.font-family', '.background','.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height'],div : ['id', 'class', 'align', '.border', '.margin', '.padding', '.text-align', '.color','.background-color', '.font-size', '.font-family', '.font-weight', '.background','.font-style', '.text-decoration', '.vertical-align', '.margin-left'],table: ['id', 'class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor','.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color','.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background','.width', '.height', '.border-collapse'],'td,th': ['id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor','.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight','.font-style', '.text-decoration', '.vertical-align', '.background', '.border'],a : ['id', 'class', 'href', 'target', 'name'],embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : ['id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background','.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'],pre : ['id', 'class'],hr : ['id', 'class', '.page-break-after'],'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del' : ['id', 'class'],iframe : ['id', 'class', 'src', 'frameborder', 'width', 'height', '.width', '.height']},layout : '<div class="container"><div class="toolbar"></div><div class="edit"></div><div class="statusbar"></div></div>'});});}
//btn 为按钮,txt为存放图片地址容器
function kindeditorUploadBtn(btn,txt){KindEditor.ready(function(K) {var editor = K.editor({allowFileManager : true,uploadJson:'/aaa.php?m=Attachment&a=upload',});K('#'+btn).click(function() {editor.loadPlugin('image', function() {editor.plugin.imageDialog({showRemote : false,imageUrl : K('#'+txt).val(),clickFn : function(url, title, width, height, border, align) {K('#'+txt).val(url);editor.hideDialog();}});});});});}
0 0
- KindEditor编辑器初始化和单按钮上传控件
- KindEditor编辑器初始化参数
- KindEditor编辑器初始化参数
- kindeditor编辑器上传图片
- kindeditor 上传控件
- kindeditor编辑器和图片上传独立分开的配置细节
- 在项目中集成kindeditor图片上传和编辑器功能
- 关于kindeditor编辑器批量上传图片不显示添加图片按钮的问题
- KindEditor编辑器上传修改拿shell漏洞
- KindEditor编辑器的图片上传问题
- SpringMVC+KindEditor在线编辑器之文件上传
- PHP 编辑器 kindEditor 上传图片失败 解决方案
- KindEditor编辑器上传图片超过限制
- kindeditor 在线编辑器配置上传文件功能
- Asp.net单按钮上传文件和批量上传图片
- ecshop更换升级FCKeditor编辑器到Kindeditor,支持图片批量上传,和百度地图添加
- kindeditor编辑器和图片上传独立分开的配置细节(转载)
- MFC控件编程:静态控件、按钮控件(一般按钮、单选按钮和复选按钮)、组合框控件、列表框控件、动画控件
- 【DP经典问题】WordBreak
- [Leetcode] Subsets (Java)
- 基于RSA的网站登录密码的加密传输
- Eclipse导入Android项目的正确方法
- Android按钮按下的时候改变颜色
- KindEditor编辑器初始化和单按钮上传控件
- 一些重要的HTML元素属性实时汇总
- solr:copyfield的简单介绍
- 记录
- 让低版本浏览器支持input的placeholder属性
- ClassLoader(包括一个工具类)
- opengl编程指南笔记(三)第二章 状态管理和绘制几何物体
- C++中的用来调试的宏
- android 典型问题:R.java文件不能自动生成的解决办法