https://github.com/rbartholomay/ExtJS.ux.HtmlEditor.Plugins是一组与ExtJS4兼容的插件,用于htmleditor字段。在包含htmleditor字段的Netzke表单面板中使用这些插件的最佳方式是什么?总的来说,我想知道如何在Netzke中使用ExtJS插件。
下面是我的一些代码:
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请帮帮忙。
发布于 2012-04-10 13:33:22
它依赖于ExtJS4应用程序接口。您可以将htmleditor的任何配置属性直接传递给您的项目散列配置,如下所示
{
:xtype => :htmleditor,
:some_config => "some_value"
}因为当你使用":xtype“时,netzke会用你喜欢的配置创建ExtJS组件,而不是Netzke组件。(像Netzke::Basepack::Panel不同于:xtype => :panel)
发布于 2012-03-27 02:10:19
你需要什么来“做一些改变”?我想你想从htmleditor中删除一些基本的工作人员,比如字体,超链接,是吗?这很简单:
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我想这就是你要找的。
https://stackoverflow.com/questions/9517819
复制相似问题