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>

    效果图:

  • 相关阅读:
    Codeforces Gym 100571A A. Cursed Query 离线
    codeforces Gym 100500 J. Bye Bye Russia
    codeforces Gym 100500H H. ICPC Quest 水题
    codeforces Gym 100500H A. Potion of Immortality 简单DP
    Codeforces Gym 100500F Problem F. Door Lock 二分
    codeforces Gym 100500C D.Hall of Fame 排序
    spring data jpa 创建方法名进行简单查询
    Spring集成JPA提示Not an managed type
    hibernate配置文件中的catalog属性
    SonarLint插件的安装与使用
  • 原文地址:https://www.cnblogs.com/libingql/p/2465347.html
Copyright © 2011-2022 走看看