2010-04-22 49 views
0

我使用的YUI Rich Editor(SimpleEditor)提供了一個標題爲「文本編輯工具」和一個顯示/隱藏編輯按鈕的編輯器(編輯器名稱爲SimpleEditor)工具。我不需要這個,我怎麼能隱藏它們或禁用這些功能?刪除YUI Rich Editor標題並使其不可摺疊

謝謝!

回答

0

你(我)可以使用這樣的配置:

var myConfig = { 
    height: '300px', 
    width: '522px', 
    toolbar: { 
     collapse: false, 
     titlebar: '', 
     draggable: false, 
     buttons: [ 
      { group: 'textstyle', label: 'Font Style', 
       buttons: [ 
        { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' }, 
        { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' }, 
        { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' }, 
        { type: 'separator' }, 
        { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true }, 
        { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true } 
       ] 
      }, 
      { type: 'separator' }, 
      { group: 'indentlist', label: 'Lists', 
       buttons: [ 
        { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' }, 
        { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' } 
       ] 
      } 
     ] 
    } 
}; 
1

這個CSS添加到頁面:

.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar { 
    display: none; 
} 

以供將來參考,YUI的支持是在這裏:http://yuilibrary.com/forum/