include/SugarTinyMCE.php

Show: inherited
Table of Contents

\SugarTinyMCE

Package: SugarCRM

PHP wrapper class for Javascript driven TinyMCE WYSIWYG HTML editor

Properties

Propertypublic  $buttonConfigs= 'array( '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"), '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' => "", 'buttonConfig3' => ""), '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' => "", 'buttonConfig3' => ""), )'
Default valuearray( '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"), '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' => "", 'buttonConfig3' => ""), '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' => "", 'buttonConfig3' => ""), )Details
Type
n/a
Propertypublic  $customConfigFile= ''custom/include/tinyButtonConfig.php''
Default value'custom/include/tinyButtonConfig.php'Details
Type
n/a
Propertypublic  $customDefaultConfigFile= ''custom/include/tinyMCEDefaultConfig.php''
Default value'custom/include/tinyMCEDefaultConfig.php'Details
Type
n/a
Propertypublic  $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', )'
Default valuearray( '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', )Details
Type
n/a
Propertypublic  $jsroot= '"include/javascript/tiny_mce/"'
Default value"include/javascript/tiny_mce/"Details
Type
n/a
Propertypublic  $pluginsConfig= 'array( 'email_compose_light' => 'insertdatetime,paste,directionality,safari', 'email_compose' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality,fullpage', )'
Default valuearray( 'email_compose_light' => 'insertdatetime,paste,directionality,safari', 'email_compose' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality,fullpage', )Details
Type
n/a

Methods

methodpublicSugarTinyMCE( ) : void

Sole constructor

methodpubliccleanEncodedMCEHtml(  $html ) : \$html

This function takes in html code that has been produced (and somewhat mauled) by TinyMCE and returns a cleaned copy of it.

Parameters
Name Type Description
$html
Returns
Type Description
\$html with all the tinyMCE specific html removed
methodpublicgetConfig(  $type = 'default' ) : void

Parameters
Name Type Description
$type
methodpublicgetInstance( string $targets = "" ) : string

Returns the Javascript necessary to initialize a TinyMCE instance for a given