2010-09-10 100 views
1

我最近把TinyMCE用在了我正在處理的應用程序中。一切正常,但工具欄顯示在底部。我查閱了文件。TinyMce格式問題

TinyMCE Configuration

本文檔介紹如何配置工具欄的位置給你使用高級模式,而不是簡單。我已確認我使用的是正確的模式以及我的默認佈局是SimpleLayout但我在使用他們指定的代碼時未看到更改。

theme_advanced_toolbar_location : "top" 

這裏是我的腳本是什麼樣子

tinyMCE.init({ 
width : "500", 
height : "100", 

// General options 
mode : "textareas", 
theme : "advanced", 
editor_selector : "mceSimple" 

// Theme options 
theme_advanced_buttons1 :"bold,italic,underline,strikethrough,forecolor,backcolor", 
theme_advanced_buttons2 : "", 
theme_advanced_buttons3 : "", 
theme_advanced_toolbar_location : "top", 
theme_advanced_toolbar_align : "left", 
theme_advanced_layout_manager : "SimpleLayout" 
theme_advanced_resizing : true, 

}); 

我知道,我並不需要指定佈局管理器,但我沒有,它只是表明我將其指定爲SimpleLayout

我是否做錯了,不允許它顯示textarea頂部的工具欄反對底部?

回答

2

幾個月前我使用了tinyMCE。我確實遇到了一些麻煩,讓工具欄響應正確的方式。我做了一些工作並找到了一些答案,但我不記得那些答案的確切答案。我們希望,從我使用這個代碼將會幫助你,它的偉大工程:

tinyMCE.init({ 
content_css: "/connectation/css/tinyMCEcontent.css", 
theme_advanced_font_sizes: "8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,20pt", 
font_size_style_values : "8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,20pt", 
mode : "textareas", 
theme: "advanced", 
theme_advanced_buttons1: "bold,italic,underline,|,fontselect,fontsizeselect", 
theme_advanced_buttons2: "forecolor,backcolor,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,hr", 
theme_advanced_buttons3: "" 
}); 

我沒有看到很多比我指着我自己的CSS等的差異。這裏的css文件的內容在以下情況下有幫助:

body, td, pre { 
    font: 9pt Century Gothic, Verdana, Arial, Sans-Serif; 
    color: #333333; 
    } 

    body { 
    background-color: #FFFFFF; 
    } 

    .mceVisualAid { 
    border: 1px dashed #BBBBBB; 
    } 

    /* MSIE specific */ 

    * html body { 
    scrollbar-3dlight-color: #F0F0EE; 
    scrollbar-arrow-color: #676662; 
    scrollbar-base-color: #F0F0EE; 
    scrollbar-darkshadow-color: #DDDDDD; 
    scrollbar-face-color: #E0E0DD; 
    scrollbar-highlight-color: #F0F0EE; 
    scrollbar-shadow-color: #F0F0EE; 
    scrollbar-track-color: #F5F5F5; 
    }