CuteEditor for .NET

Dialog Customization

Dialog Customization


CuteEditor makes it easy for you to customize the dialogs.

This chapter contains the following topics:



Customize Dialog's background color, font...

Please modify the following style sheet file:

CuteSoft_Client\CuteEditor\Themes\ThemeName\dialog.css


Customize Dialog's size

Please open the following JavaScript file:

CuteSoft_Client\CuteEditor\Scripts\Constant.js

For example, if you want to modify the size of Insert Emotion dialog, you need to modify the following code:

// Default window ornaments for the Emotion dialog

editorconstant._emotionDialogFeature = "resizable:0;dialogWidth:280px;dialogHeight:300px;";



Remove items from individual dialogs

The following instruction shows you how to remove the browse button from insert link dialog.

Open Tag_A.ascx file and change the following code:

<button id="btnbrowse">[[Browse]]</button>

to:

<button id="btnbrowse" style="display:none">[[Browse]]</button>



Remove 'General' and 'Style Builder' tabs from tag dialogs

The following instruction shows you how to remove 'General' and 'Style Builder' tabs from tag dialogs.

Please open CuteEditorWeb\CuteSoft_Client\CuteEditor\Dialogs\tag.config.
 

To turn off the general tab, remove this line:
<add pattern="*" tab="Common" text="[[Common]]" control="Tag_Common.ascx" />

To turn off the style builder tab, remove this line:
<add pattern="*" tab="Style" text="[[StyleBuilder]]" control="Tag_Style.ascx" />



Change the default sort order in file browser dialog

Please find the file browser dialog your want to change, for example, insertimage.aspx. Change the following code:

protected override void GetFiles(ArrayList files)
{
...
}

to:

protected override void GetFiles(ArrayList files)
{
...
   files.Sort(new FileDateComparer());
}

public class FileDateComparer : IComparer
{
   public int Compare(object x, object y)
   {
       DateTime a=System.IO.File.GetCreationTime((string)x);
       DateTime b=System.IO.File.GetCreationTime((string)y);
      long val=a.Ticks-b.Ticks;
      if(val==0)
         return 0;
      if(val>0)
         return 1;
      return -1;
   }
}



Customize Dialog's Z-index

Please open the following JavaScript file:

CuteSoft_Client\CuteEditor\Scripts\Constant.js

And modify the following code:

//Default dialog's z-index

editorconstant.DialogZIndex=8888;