【问题标题】:TinyMce editor issue in google chrome谷歌浏览器中的 TinyMce 编辑器问题
【发布时间】:2012-03-21 12:34:40
【问题描述】:

我在使用谷歌浏览器中的 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}

【问题讨论】:

  • 我觉得没有你的代码有点难。
  • 能否请您发布完整的tinymce配置
  • 这是我为 TinyMce 编写的代码

标签: google-chrome tinymce editor


【解决方案1】:

CSS

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

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

和/或您可以直接使用 .mceToolbar 访问工具栏宽度

配置

或者尝试通过从heightwidth 设置中删除px 来调整您的配置:

{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

【讨论】:

    猜你喜欢
    • 2011-10-19
    • 2012-12-13
    • 1970-01-01
    • 1970-01-01
    • 2016-10-26
    • 2018-09-05
    • 2011-08-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多