分享

Ext 在线文字编辑器(htmleditor)...

 yfm10 2009-09-17

Ext 在线文字编辑器(htmleditor)

ExtJs   2009-07-20 19:49   阅读277   评论0  
字号:    

js文件:

Ext.onReady(function() {

 Ext.QuickTips.init();

  var form = new Ext.form.FormPanel({
        labelAlign: 'right',
        labelWidth: 50,
        width: 600,
        frame: true,
        items: [{
            layout: 'form',
            labelAlign: 'top',
            items: [{
                xtype: 'htmleditor',
                fieldLabel: '在线编辑器',
                id: 'editor',
                anchor: '100%'
            }]
        }],
        buttons: [{
            text: '保存'
        },{
            text: '读取'
        },{
            text: '取消'
        }]
    });
 var win = new Ext.Window({
  title:'在线咨询',
  el:'win',
  width:850,
  height:600,
  maximizable:true,  // 最大化按钮
  closable:true,  // 关闭按钮
  minimizable:true, // 最小化按钮
  layout:'fit',
  items:[form]
 });
 win.show();
 var field = new Ext.form.HtmlEditor();
});

jsp页面:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <title>在线咨询</title>
 <link rel="stylesheet" type="text/css" href="../scripts/ext/resources/css/ext-all.css" />
 <link href="../scripts/ext/resources/css/ext-extend.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="../scripts/ext/adapter/ext/ext-base.js"></script>
 <script type="text/javascript" src="../scripts/ext/ext-all.js"></script>
 <script type="text/javascript" src="../scripts/ext/ext-fun.js"></script>
 <script type="text/javascript" src="../js/OnlineConsult.js"></script>
  </head>
 
  <body>
    <dir id="win"></dir>
  </body>
</html>
结果如下:

 Ext   在线文字编辑器(htmleditor) - ㄛ緣べ戀ㄋ - 茶园天地

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约