extjs4 与 kindeditor
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="<?php echo Yii::app()->request->baseUrl;?>/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="<?php echo Yii::app()->request->baseUrl;?>/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="<?php echo Yii::app()->request->baseUrl;?>/kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
Ext.require(['*']);
Ext.onReady(function(){
Ext.QuickTips.init();
/**
* 信息内容
*/
var content = new Ext.form.TextArea(
{
fieldLabel : '信息内容',
maxLength : '1000',
height : 150,
maxLengthText : '文章提示信息长度不能超过2000字',
name : 'content',
id : 'content',
emptyText : '无',
anchor : '80%',
listeners : {
"render" : function(f) {
K = KindEditor;
htmlEditor = K
.create('#content',
{
uploadJson : '<?php echo Yii::app()->request->baseUrl;?>/kindeditor/php/upload_json.php',//路径自己改一下
fileManagerJson : '<?php echo Yii::app()->request->baseUrl;?>/kindeditor/php/file_manager_json.php',//路径自己改一下
height : 200,
width : '90%',
// fontSizeTable:['21px','20px','17px','18px','16px','14px','12px'],
resizeType : 1,
allowPreviewEmoticons : true,
allowImageUpload : true
});
}
}
});
var myForm = Ext.create('Ext.form.Panel',{
layout:'absolute',
url:'',
defaultType:'textfield',
border:true,
items:[content]
});
var win = Ext.create('Ext.window.Window', {
autoShow: true,
title: 'Resize Me',
width: 800,
height: 300,
minWidth: 300,
minHeight: 200,
layout: 'fit',
iconCls: 'icon_add',
plain:true,
items: myForm,
buttons: [{
text: 'Send'
},{
text: 'Cancel'
}]
});
});
</script>
extjs4 与 kindeditor的更多相关文章
- Extjs4.2x与富文本框编辑器KindEditor的整合
Extjs4本身的HtmlEditor编辑器,太鸡肋了,简单的html能够应付一下,稍加复杂的就无能为力了. 对于Extjs的HtmlEditor扩展主要有三个方向,一个是扩展其本身的htmlEdit ...
- 让kindeditor显示高亮代码
kindeditor4.x代码高亮功能默认使用的是prettify插件,prettify是Google提供的一款源代码语法高亮着色器,它提供一种简单的形式来着色HTML页面上的程序代码,实现方式如下: ...
- Kindeditor在ThinkPHP框架下的使用
1.简单调用Kindeditor的图片上传功能: a.Html部署图片预览,记录图片上传成功之后的路径,以及上传图片点击按钮 <tr> <td>活动图片:</td> ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(36)-文章发布系统③-kindeditor使用
系列目录 我相信目前国内富文本编辑器中KindEditor 属于前列,详细的中文帮助文档,简单的加载方式,可以定制的轻量级.都是系统的首选 很多文章教程有kindeditor的使用,但本文比较特别可能 ...
- KindEditor 给KindEditor赋值
在项目的过程中,使用了KindEditor编辑器,然后在赋值的时候,我的编辑器ID是content,然后我想通过$("#content").html()来赋值,发现赋值失败,后来百 ...
- Ajax 提交KindEditor的数据
这次我是在EasyUI中使用了KindEditor的编辑器,按照官方给的代码,总是无法获取编辑器里面的值(内容),如下: KindEditor.ready(function (K) { ...
- 如何在一个页面添加多个不同的kindeditor编辑器
kindeditor官方下载地址:http://kindeditor.net/down.php (入门必看)kindeditor官方文档:http://kindeditor.net/doc.ph ...
- kindeditor 去掉网络图片上传功能
kindeditor是一款开源的富文本编辑器,其内容设置均为可配置,使用比较灵活. 去掉网络图片的页面:allowImageRemote: false, 修改上传的图片的name:filePostNa ...
- ExtJs4之TreePanel
Tree介绍 树形结构,是程序开发,不可缺少的组件之一.ExtJs中的树,功能强大美观实用.功能齐全,拖拉,排序,异步加载等等. 在ExtJs4中Tree和Grid具有相同的父类,因此Grid具有的特 ...
随机推荐
- 【PHP开源产品】Ecshop的商品筛选功能实现分析之一
一.首先,说明一下为什么要对category.php文件进行分析. 原因如下: ①个人对商城类商品筛选功能的实现比较好奇: ②对商城中关于商品的数据表设计比较感兴趣.(该功能涉及到与数据库的交互,而且 ...
- reader,字符流
1. public class Demo1 { public static void main(String[] args) throws IOException { File file = new ...
- 记录C++学习历程
从今天开始学习C++,将学习中遇到的问题,以及解决方案记录在这个博客里. 函数 1.C++函数声明(原型) 函数原型跟函数的定义在返回值类型,函数名,参数上必须完全一致. 2.程序的内存区域:全局数据 ...
- yhd日志分析(一)
yhd日志分析(一) 依据yhd日志文件统计分析每日各时段的pv和uv 建hive表, 表列分隔符和文件保持一致 load数据到hive表 写hive sql统计pv和uv, 结果保存到hive表2 ...
- 【原创】StickHeaderListView的简单实现,解决footerView问题
1.前言: 前几天用了GitHub上se.emilsjolander.stickylistheaders这个组件,然后发现这个组件的listview不能添加footerView,加了footer后,滑 ...
- instanceof、==号、Objetc类
1)instanceof: 判断某个对象是否为某个类的实例,注意多态的运用,一个父类引用指向子类的对象,根据继承,子类就是父类,所以子类也可以看做是父类的一个实例. 形式:引用 instanceof ...
- [转]C++编写Config类读取配置文件
//Config.h #pragma once #include <string> #include <map> #include <iostream> #incl ...
- 如何从官网下载springframework和document
spring官网 http://spring.io/ --->spring project--->点击github图标 --->artifactory --->进入到了http ...
- Ubuntu14.04 Objective-C hello world
1. Install GNUstep sudo apt-get install gnustep gnustep-devel 2. Write hello world program, and save ...
- [转]Cygwin的包管理器:apt-cyg
[转]Cygwin的包管理器:apt-cyg http://zengrong.net/post/1792.htm Cygwin的包管理工具setup.exe实在是难用的让人蛋碎.于是就有了这样一个ap ...