2012-03-01 3 views
0

https://github.com/rbartholomay/ExtJS.ux.HtmlEditor.Plugins은 htmleditor 필드 용 ExtJS4 호환 플러그인 그룹입니다. htmleditor 필드가 포함 된 Netzke 양식 패널에서 이러한 플러그인을 사용하는 가장 좋은 방법은 무엇입니까? 일반적으로 Netzke에서 ExtJS 플러그인을 사용하는 방법을 알고 싶습니다.Netzke의 Ext JS 플러그인 사용

여기 내 코드의 일부입니다 :

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 

나는 HTML 편집기의 도구 모음을 일부 변경하고 싶습니다,하지만 Netzke이를 지정하는 방법을 알아낼 수 없습니다. 도와주세요.

답변

0

"약간의 변경을 가하기"당신은 무엇을 생각하니? 폰트, 하이퍼 링크와 같은 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 

나는 이것이 당신이 찾고있는 것이라고 생각합니다.

1

이것은 ExtJS4 API에 따라 다릅니다. 사용할 때 때문에 당신은

{ 
    :xtype => :htmleditor, 
    :some_config => "some_value" 
} 

처럼 항목 해시 설정에 직접 HTML 편집기의 구성 속성을 전달할 수 있습니다 "위해 xtype"당신이 configuration.It의하지 Netzke 구성 요소를 선호와 netzke는 ExtJS로 구성 요소를 작성합니다. (예 : Netzke :: Basepack :: Panel은 xtype => : panel과 다릅니다)