返回信息流用extjs4.0的htmleditor的组件,照着书写的啊,可是运行就是不对。查了一天了也不晓得问题出在哪儿= =,崩溃。。。。。。丑丑的效果图如下:
最下面的一点点可怜的编辑框。。
恩是的 明明引用了ext-lang-zh_CN.js,可是还是不识别中文,觉着这个不重要就把源码改成拼音了,源码如下:
<HTML>
<HEAD>
<TITLE>HelloWorld</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" herf="resources/css/ext-all.css" >
<script type="text/javascript" src="bootstrap.js"></script>
<script type="text/javascript" src="locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.create('Ext.form.Panel',{
title:'Ext.form.field.HtmlEditor',
width:630,
frame:true,
renderTo:'form',
bodyPadding:5,
items:[{
fieldLabel:'HTML ziduan',
xtype : 'htmleditor',
height:150,
width :600,
value :'ExtJS4 dengchang',
labelWidth :70,
labelSeparator:':',
createLinkText:'create chao lianjie',
defaultLinkValue:"http://www.",
enableAlignments:true,
enableColors:true,
enableFont:true,
enableFontSize:true,
enableFormat:true,
enableLinks:true,
enableLists:true,
enableSourceEdit:true,
fontFamilies:['songti','lishu','heiti'],
buttonTips:{
bold : {
title: 'Bold(Ctrl+B)',
text: 'cuti'
},
italic : {
title: 'Italic(Ctrl+I)',
text: 'xieti'
},
underline : {
title: 'Underline(Ctrl+U)',
text: 'xiahuaxian'
},
increasefontsize : {
title: 'Grow Text',
text: 'zengda ziti'
},
decreasefontsize : {
title: 'Shrink Text',
text: 'suoxiao ziti'
},
backcolor : {
title: 'Text Highlight Color',
text: 'beijing se'
},
forecolor : {
title: 'Font Color',
text: 'qianjing se'
},
justifyleft : {
title: 'Align Text Left',
text: 'zuo duiqi'
},
justifycenter : {
title: 'Center Text',
text: 'juzhong duiqi'
},
justifyright : {
title: 'Align Text Right',
text: 'you duiqi'
},
insertunorderedlist : {
title: 'Bullet List',
text: 'xiangmu fuhao'
},
insertorderedlist : {
title: 'Numbered List',
text: 'shuzi bianhao'
},
createlink : {
title: 'Hyperlink',
text: 'chao lianjie'
},
sourceedit : {
title: 'Source Edit',
text: 'qiehuan yuandaima bianji moshi'
}
}
}]
});
});
</script>
</HEAD>
<BODY>
<div id='form'></div>
</BODY>
</HTML>
这是一条镜像帖。来源:北邮人论坛 / www-technology / #15822同步于 2012/4/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
ext4.0的htmleditor问题 真诚求解救我于水火中的byr
piam
2012/4/10镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。