Skip to content

Instantly share code, notes, and snippets.

@sugarknowledge
Created August 20, 2012 16:20
Show Gist options
  • Select an option

  • Save sugarknowledge/3405461 to your computer and use it in GitHub Desktop.

Select an option

Save sugarknowledge/3405461 to your computer and use it in GitHub Desktop.
How to Modify the TinyMCE Editor
<?php
//create email template
$buttonConfigs['default'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,
justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,
indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap,
visualaid",
'buttonConfig3' => "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,inserttime,separator,preview"
);
//Standard email compose
$buttonConfigs['email_compose'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,
justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
//Quick email compose
$buttonConfigs['email_compose_light'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,
justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
<?php
$defaultConfig = array(
'convert_urls' => false,
'valid_children' => '+body[style]',
'height' => 300,
'width' => '100%',
'theme' => 'advanced',
'theme_advanced_toolbar_align' => "left",
'theme_advanced_toolbar_location' => "top",
'theme_advanced_buttons1' => "",
'theme_advanced_buttons2' => "",
'theme_advanced_buttons3' => "",
'strict_loading_mode' => true,
'mode' => 'exact',
'language' => 'en',
'plugins' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality',
'elements' => '',
'extended_valid_elements' => 'style[dir|lang|media|title|type],hr[class|width|size|noshade],@[class|style]',
'content_css' => 'include/javascript/tiny_mce/themes/advanced/skins/default/content.css',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment