2014-12-04 68 views
1

我試圖使用TinyMCE作爲編輯器,並希望能夠添加「hr」元素。我在他們概述的時候添加了插件,但在編輯器中沒有看到「hr」按鈕/選項。TinyMCE不會在工具欄中顯示「hr」

任何關於這個問題的見解都會很棒!

下面是我發起的:

tinymce.init({ 
    selector: "textarea", 
    plugins: [ 
     "template advlist autolink link image lists charmap print preview", 
     "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", 
     "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", 
     "save table contextmenu directionality emoticons template paste textcolor" 
    ], 
    browser_spellcheck : true , 
    toolbar: "undo redo | styleselect | bold italic | link image | template ", 
    menubar: false, 
    resize: "both", 
    content_css: "/Content/bootstrap.min.css, /Content/Site.css", 
    template_cdate_classes: "cdate creationdate", 
    template_mdate_classes: "mdate modifieddate", 
    template_selected_content_classes: "selcontent", 
    template_cdate_format: "%m/%d/%Y : %H:%M:%S", 
    template_mdate_format: "%m/%d/%Y : %H:%M:%S", 
    file_browser_callback_types: 'file image media', 

    templates: [ 
     { 
      title: "Center Column", 
      url: "/Scripts/tinymce/template/center_column.html", 
      description: "Adds Editor Name and Staff ID" 
     }, 
     { 
      title: "Two Column w/ Image Right", 
      url: "/Scripts/tinymce/template/two_column_image_right.html", 
      description: "Adds an editing timestamp." 
     }, 
     { 
      title: "Two Column w Image Left", 
      url: "/Scripts/tinymce/template/two_column_image_left.html", 
      description: "Adds an editing timestamp." 
     }, 
     { 
      title: "Contact Page", 
      url: "/Scripts/tinymce/template/contact_page.html", 
      description: "Adds an editing timestamp." 
     } 
    ] 


}); 

回答

0

嗯,你沒加HorizontalRuletoolbar選項。

2

你toollbar語法應該是這個樣子:

toolbar: "hr undo redo | styleselect | bold italic | link image | template ", 

我插入按鈕堆開始的小時按鈕,但你可以將它插入你需要的地方。希望tinyMCE會在relevant page上寫下這個。