zoukankan      html  css  js  c++  java
  • Ext.form.field.HtmlEditor编辑器字段

    1、Ext.form.field.HtmlEditor主要配置项

    配置项类型说明
    createLinkText String 创建连接提示框中默认提示信息
    defaultLinkValue String 创建连接的默认值,默认为http://
    defaultValue String 编辑器默认值
    enableAlignments Boolean 是否启用左中右对齐按钮,默认为true
    enableColors Boolean 是否启用前景色、背景色选择按钮,默认为true
    enableFont Boolean 是否启用选择字体按钮,默认为true
    enableFontSize Boolean 是否启用增大缩小字体按钮,默认为true
    enableFormat Boolean 是否启用粗体、斜体、下划线按钮,默认为true
    enableLinks Boolean 是否启用创建连接按钮,默认为true
    enableLists Boolean 是否启用列表按钮,默认为true
    enableSourceEdit Boolean 是否启用源代码编辑按钮,默认为true
    fontFamilies Array 字体数组
    buttonsTips Object 编辑器工具栏中按钮的提示信息配置对象组合,用来自定义工具栏提示消息

    2、Ext.form.field.HtmlEditor示例

    代码:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.form.field.HtmlEditor示例</title>
        <link href="ext-4.0.7-gpl/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
        <script src="ext-4.0.7-gpl/bootstrap.js" type="text/javascript"></script>
        <script type="text/javascript">
            Ext.onReady(function () {
                Ext.QuickTips.init();
                Ext.create("Ext.form.Panel", {
                    title: "Ext.form.field.HtmlEditor示例",
                     600,
                    frame: true,
                    renderTo: Ext.getBody(),
                    bodyPadding: 5,
                    items: [{
                        fieldLabel: "HTML字段",
                        xtype: "htmleditor",
                        height: 150,
                         580,
                        labelWidth: 70,
                        labelSeparator: "",
                        createLinkText: "创建超链接",
                        defaultLinkValue: "http://",
                        enableAlignments: true,
                        enableColors: true,
                        enableFont: true,
                        enableFontSize: true,
                        enableFormat: true,
                        enableLinks: true,
                        enableLists: true,
                        enableSourceEdit: true,
                        fontFamilies: ["宋体", "隶书", "黑体"]
                    }]
                });
            });
        </script>
    </head>
    <body>
    </body>
    </html>

    效果图:

  • 相关阅读:
    phpcms——列出父目录下的所有子目录问题
    chm格式文档不能阅读问题
    php学习 5 无限级分类
    phpcms——rss问题
    phpcms——评论页面修改
    phpcm后台评论管理修改评论列出条数
    php学习4 函数定义
    网站测试工具
    ASP.NET前台代码绑定后台变量方法总结收藏帖
    在asp.net网站下使用fckeditor 和fcfinder (包括修改fcfinder 来使上传文件按时间来命名和按用户分割文件)
  • 原文地址:https://www.cnblogs.com/libingql/p/2465347.html
Copyright © 2011-2022 走看看