谷歌Chrome中的TinyMce编辑器问题

时间:2012-03-21 12:34:41

标签: google-chrome tinymce editor

我在谷歌浏览器中面临TinyMce编辑器的问题。编辑器没有包含在这个浏览器中。所有编辑控件都在一行中。在其他浏览器中不会发生。如何解决这个问题?请提出任何建议吗?

下面是我对TinyMce的编码

{literal}
        <script type="text/javascript" src="{/literal}{$BASE_URL}{literal}js/tiny_mce/tiny_mce.js"></script>
        <script language="javascript" type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
                editor_selector : "mceEditor",
                theme: "advanced",
                  plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
      theme_advanced_toolbar_align: "left",
                theme_advanced_toolbar_location: "top",
                // Theme options
            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo",
            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup",
            theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
            theme_advanced_buttons5: "link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
            theme_advanced_buttons6: "fontselect,fontsizeselect,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing : true,

     template_external_list_url : "{/literal}{$BASE_URL}{literal}js/template_list.js",
            external_link_list_url : "{/literal}{$BASE_URL}{literal}js/link_list.js",
            external_image_list_url : "{/literal}{$BASE_URL}{literal}js/image_list.js",
            media_external_list_url : "{/literal}{$BASE_URL}{literal}js/media_list.js",

                height: "365px",
                width: "610px"



            });
        </script>
        {/literal}

1 个答案:

答案 0 :(得分:0)

CSS

您可以尝试使用CSS解决方案:

.mceEditor > table {
    width:/* my width */ !important;
}

和/或您可以使用.mceToolbar

直接访问工具栏宽度

配置

或者尝试从pxheight设置中删除width来调整配置:

{literal}
        <script type="text/javascript" src="{/literal}{$BASE_URL}{literal}js/tiny_mce/tiny_mce.js"></script>
        <script language="javascript" type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
                editor_selector : "mceEditor",
                theme: "advanced",
                  plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
      theme_advanced_toolbar_align: "left",
                theme_advanced_toolbar_location: "top",
                // Theme options
            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo",
            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup",
            theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
            theme_advanced_buttons5: "link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
            theme_advanced_buttons6: "fontselect,fontsizeselect,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing : true,

     template_external_list_url : "{/literal}{$BASE_URL}{literal}js/template_list.js",
            external_link_list_url : "{/literal}{$BASE_URL}{literal}js/link_list.js",
            external_image_list_url : "{/literal}{$BASE_URL}{literal}js/image_list.js",
            media_external_list_url : "{/literal}{$BASE_URL}{literal}js/media_list.js",

                height: "365",
                width: "610"
            });
        </script>
        {/literal}

http://www.tinymce.com/wiki.php/Configuration:width