2010-09-10 125 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; 
    }