简体   繁体   English

如何将HTML编辑器源代码添加到Tinymce 3.x

[英]How to add Html editor source to Tinymce 3.x

I am using Tinymce 3.4.2 and as soon as i added some plugins to Tinymce, the default Html source editor disappeared. 我使用的是Tinymce 3.4.2,一旦我向Tinymce添加了一些插件,默认的HTML源代码编辑器便消失了。 How to add the Html source editor to Tinymce 3.x ? 如何将HTML源代码编辑器添加到Tinymce 3.x?

Here is the code of all the plugin i am using 这是我正在使用的所有插件的代码

var tinymce_advanced_options = {
  mode : "textareas",
  theme : "advanced",

  // ===========================================
  // INCLUDE the PLUGIN
  // ===========================================

  plugins : "openmanager, spellchecker,   autolink,lists,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,wordcount,advlist,autosave, autoresize",

  //FILE UPLOAD MODS
  file_browser_callback: "openmanager",
  open_manager_upload_path: 'uploads/',

  // ===========================================
  // Set LANGUAGE to EN (Otherwise, you have to use plugin's translation file)
  // ===========================================

  language : "en",

  // ===========================================
  // Put PLUGIN'S BUTTON on the toolbar
  // ===========================================    

  theme_advanced_buttons1 : "save, |, spellchecker,  |, bold, italic, underline, strikethrough, |, justifyleft, justifycenter, justifyright, justifyfull, cut, copy, paste, pastetext, pasteword",

  theme_advanced_buttons2 : "preview, styleselect,  formatselect, fontselect, fontsizeselect",

  theme_advanced_buttons3 : "openmanager, |, image, |,  media, |, bullist,numlist,|, outdent,indent,  blockquote, |,undo,redo,|, link,unlink,anchor",

  theme_advanced_buttons4 : "forecolor,backcolor, |, sub,sup,|, styleprops, |, cite, abbr, acronym, del, ins, |, search, replace, |,  codeinsertdate,inserttime",

  theme_advanced_buttons5 : "tablecontrols,|,hr,removeformat,visualaid",


  theme_advanced_buttons6 : "insertlayer, moveforward, movebackward, absolute, |,  attribs, |, visualchars, nonbreaking, template, pagebreak, restoredraft, cleanup, charmap,emotions, advhr, help",

  theme_advanced_buttons7 : "iespell, print,|,ltr,rtl,|, fullscreen",



  theme_advanced_layout_manager : "SimpleLayout",   
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,

  // ===========================================
  // Set RELATIVE_URLS to FALSE (This is required for images to display properly)
  // ===========================================

 //Only if i do not want to use relative url
  //relative_urls : false

};

To add the Html editor, you will just have to add the code to your theme advanced. 要添加HTML编辑器,您只需要将代码添加到高级主题中。

theme_advanced_buttons1 : "code",

More details can be found On Tinymce website 可以在Tinymce网站上找到更多详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM