RichTextEditor has taken steps into folder name management. A new and innovative capability is to allow advanced developers to build the folder name filter. Once a filter has been set, only folders whose names comply with the filter, will be displayed in the dialogs. To setup a filter, you need to be familiar with Regular Expression. Regular Expressions are advanced forms of wildcards and allow you to set filters precisely.

You can build your own folder name filter using the following methods:

Building your own folder name filter by editing security policy file

The security policy file (default.config, admin.config and guest.config) can be found in the richtexteditor/config folder. In security policy file you can find the security setting FolderPattern. This setting defines the largest size of file that can be uploaded.

FolderPattern setting can go directly under the root <rteconfig> node of security policy file. In this case, this setting will apply to all dialogs. It can also be placed into <category> node. In this case, it will only apply to the specified dialogs.

You can modify this settings to meet your own requirements.


<security name="FolderPattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->
<category for="Video">
       <security name="FolderPattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies "Video" dialog only.-->
</category>
<category for="Gallery,Image">
       <security name="FolderPattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies "Gallery","Image" dialogs only.-->
</category>

Programmatically building your own folder name filter

RichTextEditor provides a powerful method named Editor.SetSecurity that allows you programmatically manage the security settings.

Editor1.SetSecurity("*", "*", "FolderPattern", "^[a-zA-Z0-9\._\s-]+$");  <!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->
Editor1.SetSecurity("Video", "*", "FolderPattern", "^[a-zA-Z0-9\._\s-]+$");  <!-- This setting applies "Video" dialog only. -->
Editor1.SetSecurity("Gallery,Image", "*", "FolderPattern", "^[a-zA-Z0-9\._\s-]+$");  <!-- This setting applies "Gallery","Image" dialogs only. -->

Send feedback about this topic to CuteSoft. © 2003 - 2014 CuteSoft Components Inc. All rights reserved.