首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Netzke中使用Ext JS插件

在Netzke中使用Ext JS插件
EN

Stack Overflow用户
提问于 2012-03-01 22:21:20
回答 2查看 345关注 0票数 0

https://github.com/rbartholomay/ExtJS.ux.HtmlEditor.Plugins是一组与ExtJS4兼容的插件,用于htmleditor字段。在包含htmleditor字段的Netzke表单面板中使用这些插件的最佳方式是什么?总的来说,我想知道如何在Netzke中使用ExtJS插件。

下面是我的一些代码:

代码语言:javascript
复制
class DocumentForm < Netzke::Basepack::FormPanel

config do
  { 
    :title => "Edit Document",
     :items => model_fields
  }
end

def model_fields
  [{
    :xtype => 'textfield',
    :field_label => 'Title',
    :name => 'title',
    :allowBlank => false,
    :read_only => false
  },
  {
    xtype: 'htmleditor',
    name: 'body',
    field_label: 'Bodytext',
    height: 300,
    anchor: '98%',
    read_only: false,
  }]
end

请帮帮忙。

EN

回答 2

Stack Overflow用户

发布于 2012-04-10 13:33:22

它依赖于ExtJS4应用程序接口。您可以将htmleditor的任何配置属性直接传递给您的项目散列配置,如下所示

代码语言:javascript
复制
{
  :xtype => :htmleditor,
  :some_config => "some_value"
}

因为当你使用":xtype“时,netzke会用你喜欢的配置创建ExtJS组件,而不是Netzke组件。(像Netzke::Basepack::Panel不同于:xtype => :panel)

票数 1
EN

Stack Overflow用户

发布于 2012-03-27 02:10:19

你需要什么来“做一些改变”?我想你想从htmleditor中删除一些基本的工作人员,比如字体,超链接,是吗?这很简单:

代码语言:javascript
复制
    xtype => 'htmleditor',
    name => 'body',
    field_label: 'Bodytext',
    height => 300,
    anchor => '98%',
    read_only => false,
    enableColors => false,
    enableAlignments => false,
    enableFont => false,
    enableFontSize => false,
    enableFormat => false,
    enableLists => false

我想这就是你要找的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9517819

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档