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具有的特 ...
随机推荐
- python 解析XML python模块xml.dom解析xml实例代码
分享下python中使用模块xml.dom解析xml文件的实例代码,学习下python解析xml文件的方法. 原文转自:http://www.jbxue.com/article/16587.html ...
- Linux安全运维日志排查几个 tips
运维日志排查记录 前言 记录一些排查常见日志的命令,方法wiki,欢迎补充(Markdown 语法). 常用命令 查找关键词并统计行数 cat 2015_7_25_test_access.log | ...
- Nginx Location匹配举例
1.location / { if (!-f $request_filename){ rewrite ^/(.+)$ /uri.php last; }} ...
- 通过API函数来控制SQLite数据库增删改查
person类属性有Intenger id,String name,Intenger age,相应的构造方法和set get方法. package com.xh.tx.dao; import and ...
- LinkedList存储一副扑克牌,实现洗牌功能。
package cd.itcast.runble; import java.util.LinkedList; import java.util.Random; /** * LinkedList存储一副 ...
- DevExpress GridControl 部分用法
1.GridControl赋值:this.GridControl1.DataSouce=dt; 2.GridContro总合计及分组合计: 常规总合计直接RunDesigner-Group Summa ...
- JqueryUI
http://jqueryui.com/ http://www.runoob.com/jqueryui/jqueryui-tutorial.html
- java 单例模式总结
单例模式的实现方式总结: 第一种方式:同步获取实例的方法,多线程安全,懒汉模式.在调用实例的时刻初始化. public class Singleton1 { private static Single ...
- spring使用JdbcDaoSupport中封装的JdbcTemplate进行query
1.Dept package cn.hxex.springcore.jdbc; public class Dept { private Integer deptNo; private String d ...
- ListBox mvvm 学习笔记
1. ListBox MvvM 例子1. 简单的绑定,ItemsSource 绑定到一个实现了IEnumerable 的类上.一般该绑定都是双向的,所以优先考虑使用 ObservableCollec ...