Author Topic: Getting rid of line breaks in TinyMCE **Solved**  (Read 3339 times)

Offline mattfox27

  • Jr. Member
  • **
  • Posts: 53
Getting rid of line breaks in TinyMCE **Solved**
« on: September 26, 2010, 05:02:38 PM »
Got It...See below for instructions.
« Last Edit: September 26, 2010, 06:42:40 PM by mattfox27 »

Offline mattfox27

  • Jr. Member
  • **
  • Posts: 53
Where can you edit the tinyMCE options?
« Reply #1 on: September 26, 2010, 06:39:44 PM »
Ok so i found the place to edit tinymce if anyone wants to know...

Mail/Programs/JS/editor.js


To get rid of the line breaks while using tinymce add the code in red...

Theres also a cool right click context menu in tinymce, you can enable it by adding it to the pugins string also in red.

Code: [Select]
tinyMCE.init({
      mode : 'textareas',
      editor_selector : 'mce_editor',
      accessibility_focus : false,
      apply_source_formatting : true,
      theme : 'advanced',
      language : editor_lang,
      plugins : 'paste,emotions,media,nonbreaking,[COLOR=Red]contextmenu,[/COLOR]table,searchreplace,visualchars,directionality' + (spellcheck ? ',spellchecker' : ''),
      theme_advanced_buttons1 : 'bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,ltr,rtl,blockquote,|,forecolor,backcolor,fontselect,fontsizeselect',
      theme_advanced_buttons2 : 'link,unlink,code,|,emotions,charmap,image,media,|,search' + (spellcheck ? ',spellchecker' : '') + ',undo,redo',
      theme_advanced_buttons3 : '',
      theme_advanced_toolbar_location : 'top',
      theme_advanced_toolbar_align : 'left',
      extended_valid_elements : 'font[face|size|color|style],span[id|class|align|style]',
      content_css : skin_path + '/editor_content.css',
      external_image_list_url : 'program/js/editor_images.js',
      spellchecker_languages : (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
      spellchecker_rpc_url : '?_task=utils&_action=spell&tiny=1',
      gecko_spellcheck : true,
      relative_urls : false,
      remove_script_host : false,
     [COLOR=Red][I] force_br_newlines : true,    //Added to BR lines tinymce
      force_p_newlines : false,    //Added to BR linee timymce
      forced_root_block : false,    //Added to BR lines tinymce [/I]   [/COLOR]
      rc_client : rcmail,
      oninit : 'rcmail_editor_callback'
    });
« Last Edit: September 26, 2010, 06:47:01 PM by mattfox27 »

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Where can you edit the tinyMCE options?
« Reply #2 on: September 26, 2010, 11:08:26 PM »
I tried that for a while on a test install, but it caused more small issues than it was worth. As I recall, there were signature format errors in IE, and maybe other problems with the top-post/bottom-post composing in some browsers. In any case, I do recall that the behavior was not consistent among different browsers. I went back to the default for my production instance. I figure that there's a reason that TinyMCE warns against using those settings.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline mattfox27

  • Jr. Member
  • **
  • Posts: 53
Where can you edit the tinyMCE options?
« Reply #3 on: September 27, 2010, 04:03:37 PM »
I upgraded the tinymce to the latest version i don't know if that makes any diffrence...it just seems like a stupid setup on tinymce's part weird stuff....well if i get anything weird with new tinymce version i will post.