Location: PHPKode > projects > Quick.Cart - free and simple to use shopping cart script > plugins/plugins-admin.php
<?php
/**
* Function returns editor
* @return string
* @param  string  $sName
* @param  int     $iH
* @param  int     $iW
* @param  string  $sContent
*/
function htmlEditor( $sName = 'sDescriptionFull', $iH = '300', $iW = '100%', $sContent = '' ){
  $sEdit = '';
  if( !strstr( $iH, '%' ) )
    $iH .= 'px';
  if( !strstr( $iW, '%' ) )
    $iW .= 'px';

  if( WYSIWYG === true ){
    if( !defined( 'WYSIWYG_START' ) ){
      define( 'WYSIWYG_START', true );
      $sEdit .= '<script language="javascript" type="text/javascript" src="'.$GLOBALS['config']['dir_plugins'].'tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
      <script language="javascript" type="text/javascript">
        <!--
        var theme_advanced_buttons1 = "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,undo,redo";
        var theme_advanced_buttons2 = "";
        var additional_buttons = ",link,unlink,cleanup,removeformat,|,help,code";
        if( parseInt( window.screen.availWidth ) < 1130 )
          theme_advanced_buttons2 = additional_buttons;
        else
          theme_advanced_buttons1 += ",|"+additional_buttons;
        tinyMCE.init({
          theme : "advanced",
          mode : "exact",
          entity_encoding : "raw",
          elements : "sDescriptionShort,sDescriptionFull,sContent",
          theme_advanced_buttons1 : theme_advanced_buttons1,
          theme_advanced_buttons2 : theme_advanced_buttons2,
          theme_advanced_toolbar_location : "top",
          theme_advanced_toolbar_align : "left",
          theme_advanced_resizing : true,
          theme_advanced_resize_horizontal : false,
          debug : false
        });
        //-->
      </script>';
    }
  }
  $sEdit .= '<textarea name="'.$sName.'" id="'.$sName.'" rows="20" cols="60" style="width:'.$iW.';height:'.$iH.';" tabindex="1">'.$sContent.'</textarea>';

  return $sEdit;
} // end function htmlEditor
?>
Return current item: Quick.Cart - free and simple to use shopping cart script