Cute Editor for PHP

Font Size dropdown Customization

Font Size dropdown Customization


The Font Size dropdown of CuteEditor by default displays a predefined set of font Sizes. You can easily modify this default set using the following methods.

1: Edit Dropdown Configuration file (Common.config).

The dropdown configuration file (Common.config) can be found in the CuteEditor_Files/onfiguration/Shared folder. In dropdown configuration file you can find the FontSize element which contains the configuration information for the Font Size dropdown within Cute Editor.  By default, it contains the following font sizes:

 

 

You can modify the FontSize element to create your own font size list.

Example 1:


<
FontSize>
      <item text="1 (8pt)" value="1" />
    
<item text="2 (10pt)" value="2" />
     
<item text="5 (18pt)" value="5" />
</FontSize>

Now the Font Size dropdown contains only 1, 2and 5.


 

Example 2:

<FontSize>
      <item text="10px" value="10px" />
    
<item text="12px" value="12px" />
     
<item text="14px" value="14px" />
</FontSize>

Now the Font Size dropdown contains only 10x, 12px and 14px.


 

 

 


2: Programmatically populate the Font Size dropdown

Example:

<?php
         $editor=new CuteEditor();
         $editor->ID="Editor1";
         $editor->Text="Type here";
         //Programmatically populate the Font Size dropdown
         $editor->FontSizesList="2,3,4";
         $editor->Draw();
         $editor=null; 

         //use $_POST["Editor1"]to catch the data
?>