整合Kindeditor比CKEditor要简单许多许多(CKEditor与Ext JS的结合不是非常好),详细代码如下:
Ext.define('GB.view.CKeditor', {
extend : 'Ext.Component',
alias : 'widget.ckeditor',
initComponent : function() {
this.html = "<textarea id='" + this.getId() + "-input' name='" + this.name + "'></textarea>";
this.callParent(arguments);
this.on("boxready", function(t) {
this.inputEL = Ext.get(this.getId() + "-input");
this.editor = KindEditor.create('textarea[name="' + this.name + '"]', {
width : t.getWidth()+4,
height : t.getHeight()-4,
resizeType : null,
allowPreviewEmoticons : false,
allowImageUpload : false,
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', 'flash', 'media', 'table', 'hr', 'emoticons', 'pagebreak', 'anchor', 'link', 'unlink']
});
});
this.on("resize",function(t,w,h){
this.editor.resize(w+4,h-4)
});
},
setValue : function(value) {
if (this.editor) {
this.editor.html(value);
}
},
reset : function() {
if (this.editor) {
this.editor.html('');
}
},
setRawValue : function(value) {
if (this.editor) {
this.editor.text(value);
}
},
getValue : function() {
if (this.editor) {
return this.editor.html();
} else {
return ''
}
},
getRawValue : function() {
if (this.editor) {
return this.editor.text();
} else {
return ''
}
}
});
在这里,我去掉了KindEditor的上传功能,因为如果扯上传的话,就会扯出很多很多问题。
上面这个基本够用。
效果看起来还不错,我使用的是border布局。
- 大小: 42.2 KB
分享到:
相关推荐
ext-4.1.1的API和spket-1.6.23.zip控件
ext-4.1.1a
ext-4.1.1包和中文文档
Ext-4.1.1源码以及Ext 3.3API手册
Ext js-4.1.1+Ext js-4.1.0+Ext4.1.0API中文版 .
ext-base ext-4.1.1a-commercial
ext-4.1.1a.js,需要的请下载,如还需要其它相关的ext文档请联系我,谢谢
crypto-js4.1.1版本,js在crypto-js文件夹里面
官网下过来的,ajax框架EXT4.1,很好的
目前最新版本的Ext4.1+spket下载包,同时附有myeclipse上安装spket指导。
修改过kindeditor的filemanager.js,flash.js,image.js,insertfile.js,media.js,map。主要文件Public\js\kedit.js,WebApp\Lib\ORG\Keditor.class.php,Lib\Action\Common\KeditorAction.class.php
AUTO.JS v4.1.1 纯净
auto.js 4.1.1.apk以及打包插件
Auto.js 4.1.1 纯APP下载.大家都下不到便宜的, 可以开发很多有趣的东西 练习自己的技术绝活
Ext4.1.1a实现的gridePanel导出Excel,适用浏览器360极速,谷歌浏览器
auto.js 4.1.1版本 和最新版本 附带有4.1.1打包工具
Auto.js_4.1.1 Alpha2手机安卓版软件和Auto.js_4.1.0打包插件,开发者必备的工具
只需要将此文件复制到ext4.1.1的build路径下,覆盖原有文件,然后再安装好spket-1.6.23的eclipse下配置即可实现Ext4的自动提示
安卓 android版 Auto.JS 4.1.1 Alpha2 (免费版)
网上下载的datetimefield 在4.1.1下面不能正常... 'Ext': '../../ext-4.1.1', 'Ext.ex': '.' } }); Ext.require([ 'Ext.ex.form.field.DateTime' ]); { xtype : 'datetimefield', format : 'Y-m-d H:i:s' }