Getting started

Integrate seamlessly with your ASP application

Thank you for choosing Rich Text Editor for ASP!

Rich Text Editor for ASP is by far the fastest, easiest, most powerful WYSIWYG (What You See Is What You Get) browser-based HTML Editor for ASP. It enables ASP Web developers to replace the Textarea/Textbox in your existing content management system with a powerful, but easy to use WYSIWYG HTML editing component. It empowers business users to make content updates easily and safely themselves while maintaining control over site design and content, all at an affordable price.

Rich Text Editor toolbar is completely configurable and it is also effortless to implement. You just need a couple lines of code to add this editor to your applications.

Click one of the items below to learn more about Rich Text Editor for ASP.

  • Top features and Benefits
  • Deploying Rich Text Editor for ASP
  • Feature Comparison Chart
  • Deploying Rich Text Editor license file

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


Top Features and Benefits

The leading WYSIWYG, browser-based, XHTML/HTML editor lets content contributors easily create and publish Web content, while developers maintain control over a site's look and feel.

Thousands of companies have integrated Rich Text Editor into content management systems, e-learning, discussion forums, Web e-mail, and other applications. Plus, Rich Text Editor allows developers to easily customize and extend the editor.

A cross-browser, cross-platform WYSIWYG Editor

Following 9 year old tradition of industry #1 cross-browser support, RichTextEditor continues to offer even better quality and compatibility by supporting all major browsers: IE 6.0+, Firefox 2.0+, Mozilla 1.3+, Safari (1.3+), Opera 9.0, IE 9 and Chrome. This includes Macintosh and Linux.

Generates clean XHTML. Compliant with the web standards, no deprecated tags

Most WYSIWYG editors are just JavaScript wrappers around the editing control built into browsers such as the MSHTML control found in IE. These types of editor (which generate HTML and then run code clean-up routines against it) have significant limitations. By contrast, RichTextEditor is built from the ground up to be a true XHTML editor in its own right.

Extremely small and fast

Most feature-rich WYSIWYG editors suffer long loading times due to large javascript files. RichTextEditor only loads the necessaery scripts to client browsers. Numerous optimization methods have been applied. It's clean, compact, extremely fast-loading, but still powerful and efficient.

Insert clean HTML from Microsoft Word

When text is pasted from Microsoft Word a lot of unnecessary word specific markup is carried across. This can result in web pages that take an unnecessarily long time to download. The Paste from Word button solves this by removing word markup before pasting the text into your web page.

Advanced file upload function

We integrate a hi-performance ASP upload component - ASP Uploader into Rich Text Editor. ASP Uploader allows you to select and upload multiple files at once. It also supports client side validation of the file size/type before uploading.

Format Painter

The Format Painter takes the formatting from one piece of text and pastes it onto content you select. This is handy when you have a combination of formats on something, like a size, color and style, and want to apply them to another item, without having to apply them individually.

HTML5 Support

HTML5 will be the new standard for HTML. Major browsers support many of the new HTML5 elements and APIs. RichTextEditor is providing support for various HTML5 elements, attributes, and values.

Show Rulers

RichTextEditor can display rulers, one along the top and one along the left side of the editor window. Rulers allow you easiluy align text, graphics, tables, and other elements in a document.

Quick Style

RichTextEditor 8.0 has a fast and easy way to save a new style. Say you spent some time formatting text just the way you want it and you want to save that format as a style so you can use it again in your current document.

Code Cleaner

You can automatically remove empty tags, combine nested span tags, and otherwise improve messy or unreadable HTML or XHTML code.

Easy-to-use interface

RichTextEditor's streamlined toolbar is a refreshing alternative to the dizzy array of toolbar buttons/controls seen in most WYSIWYG editors. RichTextEditor is able to offer more functionalities with a tighter toolbar while advanced functionalities are also available.

Indenting text the "right" way

Most editors use <blockquote> for indenting which is wrong. Rich Text Editor encourages the correct use of <blockquote> for quotations only, and uses CSS for indenting.

AJAX Support

Rich Text Editor gives you the ability to update control content using callbacks - thus eliminating the need to re-load the entire page.

Inserts custom tags as placeholders

Rich Text Editor makes it easy for business users to add semantic meaning to text and objects by inserting custom tags that can be used as placeholders for dynamic content.

Support accessibility according to W3C WAI and section 508 accessibility guidelines.

Rich Text Editor optional accessibility settings ensure your site complies with Section 508, so people with disabilities can have full access to your content.

Integrated FLV content

Add FLV files to any web page with point-and-click ease and standards-compliant coding. Preview your movies with FLV playback capabilities in Live View.

Output HTML or well-formed XHTML to your choice

Rich Text Editor supports output well-formed XHTML. Your choice of XHTML 1.0 or HTML 4.01 output.

Unlimited levels of the undo/redo

Many of the other editors on the market cannot undo or redo certain actions, and certain table operations - such as cell merge or column deletion. Rich Text Editor has a new custom undo/redo implementation to make you can now safely undo those actions.

Multi-language support

All labels, buttons, tooltips and messages are located in external javascript language files, so that the language of the editor can be switched with a single property. You can also create a new language in a matter of minutes.

Support complete web page editing (from <HTML> to </HTML>)

Rich Text Editor allows you to edit a full HTML page, including <title>, <!DOCTYPE...> and some other options. You can also insert Form elements (checkbox, button, textarea, etc.) and modify certain properties of the element.

Enter Mode: Paragraph or LineBreak?

Rich Text Editor can be configured to define the behaviour of the ENTER KEY. You use <p>, <br /> or <div> tags when you press enter. In either mode <br> tags can be created by using shift+enter.

Support HTML code indentation and Tags appear in lower case

Rich Text Editor displays nicely indented code in the HTML mode and the generating HTML tags and Attributes are in lower case. This is very convenient and important for the advanced users.

Full-Screen editing

It does not open a new window, instead it will resize to fit the browser screen. Edit in full screen mode, maximizing your available space.

No slow Java or ActiveX components

100% DHTML, JavaScript ASP code. There are no slow Java or ActiveX components to worry about and everything is handled in the browser!

Absolute vs. relative paths/links

With Rich Text Editor, you have the choice of using either a relative or absolute URL.

Easy Implementation for Developers

The perfect addition to your content management system! Only a couple lines of code , you don't need to be an expert. Allows you to add an online HTML editing functionality that works with standard HTML form.

Easy to use API to hide buttons and tabs

RichTextEditor's toolbar is flexible and highly customizable. Buttons can be shown, hidden or re-arranged. Existing icons can be modified or new buttons added. It also allows developers to set the image directory, disable image uploading and deleting, restrict access to the source/preview tabs.

Rich Client-Side Functionality

A comprehensive client-side API is available for RichTextEditor. This functionality, which is then coupled with the ability to handle a rich set of client events allows you to have full control over the control's behavior on the client side.

Extensibility

RichTextEditor Toolbars are designed from the ground up to be extensible. Developers can easily add their own unique functionality.

Downloadable files support

You can upload document files, create a link from your HTML content to the document files (zip files, ppt files...).

CSS-based Skinning

Rich Text Editor provides several built in themes that are ready to use. Developers can completely change the appearance of the toolbar and the dialogs by simply modifying the supplied classes and images.

Advanced table manager

Create and modify tables and table cells. Set their border color, alignment, cellspacing and more! Once you've created a table, simply right click inside of it and use the handy popup menu to change its attributes. <caption>,<summary>,<thead>,<tfoot>,<th> tags are supported.

Image insertion and automatic upload

Built-in thumbnail generator. Thumbnail images are dynamically created; Supports upload new images. Paging - specify how many images. Support auto resize images.

Compatibility with the browser's back button

Don't you hate losing your edits? It is so easy to accidentally browse away from the page you are editing (eg by hitting a back space key or button). And then you have lost all your edits. Unless you are using Rich Text Editor!

Style Builder Dialog Box

With Style builder dialog box you can apply CSS style attributes directly to any HTML elements on your Web page.

Content management with templates

The basic idea behind a Content Management System (CMS) is to separate the management of content from design. Rich Text Editor allows the site designer to easily create and establish templates to give the site a uniform look. Templates may be modified when desired.

Use MaxHTMLLength or MaxTextLength to Protect Your Database

If you tried to insert a record whose text length is greater than allowed by your table, an error will be reported. To prevent this type of error from occurring, developers can use MaxHTMLLength or MaxTextLength in the Rich Text Editor to limit the length of the user’s input.

Apply security to control user access to resources

Rich Text Editor allows developers to assign a pre-defined set of permissions by group or individual. This prevents a normal user to access the administration functionality.

The details of permissions are specified by an XML security policy file. Each level maps to a specific file. The default mappings:

  • admin—maps to admin.config
  • default—maps to default.config
  • guest—maps to guest.config

You can customize and extend each policy file by editing the XML security policy file. You can also create your own policy files that define arbitrary permission sets.

Online Image Editor

People that input content on a website are generally not web designers, so most don't have that design & technical fibre in them. With online image editor, you can now edit image file with no image editing software to download or install! Easy drag and drop familiar interface. Resize, change dimensions, scale, crop, add text, optimize, rotate, flip, mirror and add watermark.

Max Upload Folder size

Max Upload Folder size(Including all subfolders and files. A must have feature for people who have limited hosting space.) Dynamic display of available free space in the Upload Folder.Limits the size of your upload folder. If the max is reached uploads will be disabled.

Clickable Image Maps

Image maps are pictures with clickable regions also known as "hotspots." When users click on one of the hotspots, they're directed to the web page you designate. RichTextEditor lets you easily create image maps to add fun and excitement to a web page.

<div> Box Formatting

<div> boxes offer a much greater ability to control the layout of a web page. With Rich Text Editor, you can put any content between <div> tags and then use CSS to style all sorts of borders, backgrounds, etc.

Use External CSS Files

Editor.ContentCss Property allows you specify the location of the style sheet that will be used by the editable area. Multiple style sheets are supported. Example: ContentCss="example.css,~/portal.css,/default.css

Universal and Virtual keyboard

Virtual Keyboard does not require changes to language settings of your system and even speeds up the entire text input process for your customers. It lets your native speaking clients to access your web resources from any location in the world without changing national keyboard layouts and fonts on their machines.

Powerful image gallery

Built-in thumbnail generator. Thumbnail images are dynamically created; View, Insert, Copy, Rename, or Delete images.Create, rename and delete image directories.

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


Buttons and Menus
Menu/Button | Function Description
Paste | Inserts content from the clipboard into the editor at the selected position.
Paste Plain Text | Pastes plain text (no formatting) into the editor.
Paste from word | Pastes the content copied form the Microsoft Word and removes any web-unfriendly tags.
Save | Saves the active content in the editor's content area
New Document | Creates a new document
Print | Prints the current page.
Spell | Launchs the spell checker.
Cut | Performs normal function of cutting.
Copy | Copies the current selection and stores it in the clipboard.
Delete | Deletes the current selection.
Find and replace | Finds and allows replacements of text in the editor's content area.
Undo | Undoes the last operation in the editor.
Redo | Redoes the previously undone action.
Format painter | Format Painter takes the formatting from one piece of text and pastes it onto content you select.
 | Font name drop-down menu sets the font face. If a selection is active, the font formatting will be applied to it.
 | Size drop-down menu sets the font size. If a selection is active, the font size formatting will be applied to it.
Bold | Bolds the selected text.
Italicize | Italicizes the selected text.
Underline | Underlines the selected text.
Strike Through | Strikes through the selected text.
Overline | Overline the selected text.
Font Color | Changes the color of the selected text to desired color.
Highlight | Highlights the selected text.
Subscript | Changes the selected text to subscript.
Superscript | Changes the selected text to superscript.
Upper Case | Converts the selected text to upper case lettering.
Lower Case | Converts the selected text to lower case lettering.
Remove Format | Removes formatting from the selected text.
Code Cleaner | Cleans up all "garbage" HTML-tags.
Select All | Selects all content.
 | Paragraph drop-down menu changes the paragraph style of the selected text.
 | Style drop-down menu changes the CSS class and CSS style of the selected text.
Justify Left | Aligns the selected content to the left.
Justify Center | Centers the selected content.
Justify Right | Aligns the selected content to the right
Justify Full | Stretches the lines so that each line has equal width.
Justify None | The justification is disabled.
Line Height | Set the line height in percent.
Left to right | Set the text direction to "left-to-right".
Right to left | Set the text direction to "right-to-left".
Break | Inserts a line break (br).
Insert WBR (HTML5) | Inserts a line break.
Insert div line break | Inserts a line break.
Paragraph | Inserts a paragraph
Insert Rule | Inserts a horizontal rule at the selected position in the editor.
Insert Page Break | Inserts a print page break
Insert top line | Inserts a line break in the top of the document
Insert bottom line | Inserts a line break in the bottom of the document
Ordered List | Inserts an ordered list.
Unordered List | Inserts an unordered list.
Indent | Indents the selected content.
Outdent | Outdents the selected content.
Insert blockquote | Inserts a block quote into your document.
Insert Table | Inserts a table into your document.
Image gallery | Inserts a local image from the image gallery folder; thumbnail images are dynamically created and supports uploading of new images.
Insert image | Inserts an image at the selected position in the editor and allows you to set it's properties.
Form | Inserts a form at the selected position.
TextArea | Inserts a textarea at the selected position.
Input Text Box | Inserts an input text box at the selected position.
Password field | Inserts a password field at the selected position.
Hidden field | Inserts a hidden field at the selected position.
ListBox | Inserts a list box at the selected position.
Dropdown Box | Inserts a dropdown box at the selected position.
Radio Button | Inserts a radio button at the selected position.
Checkbox | Inserts a checkbox at the selected position.
Image Button | Inserts an image button at the selected position.
Submit Button | Inserts a submit button at the selected position.
Reset Button | Inserts a reset button at the selected position.
Input Button | Inserts aninput button at the selected position.
Insert a layout box | Inserts a layout box on your web page creates a DIV tag and set its formatting.
Insert a layer | Allows you to insert a layer (absolutely-positioned div).
Insert groupbox | Allows you to a group box (FieldSet) at the selected position in the editor.
HTML5 tags | Allows you to insert HTML5 tags.
Toggle Border | Toggles the visibility of borders.
Fit to window | Edits in full screen mode, maximizing your available space.
Help | Displays a user guide.
Insert Link | The image button allows you add a link to the text. The arrow button allows you add predefined links into the current selection.
Remove Link | Removes the hyperlink from the selected content.
Insert Anchor | Adds an anchor to the text on your page.
Add image map | Adds an image map.
Insert date and time | Inserts the current date and time. The date format used is the date format configured on the client's machine.
Special Chars | Inserts a special character from a predefined list.
Universal Keyboard | Universal Online Keyboard.
Page Properties | Allows you modify the page properties.
Insert Template | The image button allows you add the predefined templates into the current selection. The arrow button allows you add predefined code snippets into the current selection.
Insert Document | Inserts a link to a document on the server (PDF,DOC, ZIP,etc.) at the selected position.
Insert video | Inserts a video at the selected position and allows you to set it's properties.
SyntaxHighlighter | Allows you to easily post syntax highlighted code.
YouTube | Embeds a youtube video at the selected position and allows you to set it's properties.
Google map | Inserts a Google map at the selected position.

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


Feature Comparison Chart
Features |  | Feature Details | Competitors | CE6.6 | RTE8.0
Clean, lightweight and extremely fast loading | extremely fast loading | Numerous optimization methods have been applied. It's clean, compact, extremely fast-loading, but still powerful and efficient. |  | limited |
Cross Browser Support |  | Rich Text Editor for ASP supports all Internet Explorer versions from 6.0 up on Windows, and Chrome, Mozilla 1.4, Opera 9.x, Safari (1.3+) or any other browser with an equivalent gecko layout engine on any platform where these browsers are available. This includes Macintosh and Linux. | none or limited | limited |
Advanced file upload function |  | We integrate a hi-performance ASP upload component - ASP Uploader into Rich Text Editor. Ajax Uploader allows you to select and upload multiple files at once. It also supports client side validation of the file size/type before uploading. | none |  |
Format Painter |  | The Format Painter takes the formatting from one piece of text and pastes it onto content you select. This is handy when you have a combination of formats on something, like a size, color and style, and want to apply them to another item, without having to apply them individually. | none | none |
HTML5 Support |  | HTML5 will be the new standard for HTML. Major browsers support many of the new HTML5 elements and APIs. RichTextEditor is providing support for various HTML5 elements, attributes, and values. | none | none |
Show Rulers |  | RichTextEditor can display rulers, one along the top and one along the left side of the editor window. Rulers allow you easiluy align text, graphics, tables, and other elements in a document. | none | none |
Quick Style |  | RichTextEditor 8.0 has a fast and easy way to save a new style. Say you spent some time formatting text just the way you want it and you want to save that format as a style so you can use it again in your current document. | none | none |
Paste clean HTML from Microsoft Word |  | When text is pasted from Microsoft Word allot of unnecessary word specific markup is carried across. This can result in web pages that take an unnecessarily long time to download. The Paste from Word button solves this by removing word markup before pasting the text into your page. | varies | limited |
Full-Screen editing support |  | It does not open a new window, instead it will resize to fit the browser screen. Edit in full screen mode, maximizing your available space. |  |  |
Unlimited levels of the undo/redo |  | Many of the other editors on the market cannot undo or redo certain actions, and certain table operations - such as cell merge or column deletion. Rich Text Editor has a new custom undo/redo implementation to make you can now safely undo those actions. | none or limited |  |
CSS-based Skinning |  | Rich Text Editor provides several built in skins that are ready to use. Developers can completely change the appearance of the toolbar and the dialogs by simply modifying the supplied classes and images. | none or limited |  |
Style Builder Dialog Box |  | With Style builder dialog box you can apply CSS style attributes directly to any HTML elements on your Web page. |  |  |
Content management with templates |  | The basic idea behind a Content Management System (CMS) is to separate the management of content from design. Rich Text Editor allows the site designer to easily create and establish templates to give the site a uniform look. Templates may be modified when desired. |  |  |
Use MaxHTMLLength or MaxTextLength to Protect Your Database |  | If you tried to insert a record whose text length is greater than allowed by your table, an error will be reported. To prevent this type of error from occurring, developers can use MaxHTMLLength or MaxTextLength in the Rich Text Editor to limit the length of the user’s input. |  |  |
Multi-language support |  | All labels, buttons, tooltips and messages are located in external javascript language files, so that the language of the editor can be switched with a single property. You can also create a new language in a matter of minutes. | varies |  |
Support complete page editing (from <HTML> to </HTML>) |  | Rich Text Editor allows you to edit a full HTML page, including <title>, <!DOCTYPE...> and some other options. You can also insert Form elements (checkbox, button, textarea, etc.) and modify certain properties of the element. | none or limited |  |
Enter Mode: Paragraph or LineBreak? |  | Rich Text Editor can be configured to define the behaviour of the ENTER KEY. You use <p>, <br /> or <div> tags when you press enter. In either mode <br> tags can be created by using shift+enter. | none or limited |  |
Universal and Virtual keyboard |  | Virtual Keyboard does not require changes to language settings of your system and even speeds up the entire text input process for your customers. It lets your native speaking clients to access your web resources from any location in the world without changing national keyboard layouts and fonts on their machines. |  |  |
Support HTML code indentation and Tags appear in lower case |  | Rich Text Editor displays nicely indented code in the HTML mode and the generating HTML tags and Attributes are in lower case. This is very convenient and important for the advanced users. |  |  |
Advanced table manager |  | Create and modify tables and table cells. Set their border color, alignment, cellspacing and more! Once you've created a table, simply right click inside of it and use the handy popup menu to change its attributes. <caption>,<summary>,<thead>,<tfoot>,<th> tags are supported. | none or limited |  |
<div> Box Formatting |  | <div> boxes offer a much greater ability to control the layout of a page. With RichTextEditor, you can put any content between <div> tags and then use CSS to style all sorts of borders, backgrounds, etc. |  |  |
Use External CSS Files |  | Editor.ContentCss Property allows you specify the location of the style sheet that will be used by the editable area. Multiple style sheets are supported. Example: ContentCss="example.css,~/portal.css,/default.css | varies |  |
Image management |  |  |  |  |
Online Image Editor | Online Image Editor | People that input content on a website are generally not web designers, so most don't have that design & technical fibre in them. With online image editor, you can now edit image file with no image editing software to download or install! Easy drag and drop familiar interface. Resize, change dimensions, scale, crop, add text, optimize, rotate, flip, mirror and add watermark. |  |  |
Max Upload Folder size |  | Max Upload Folder size (Including all subfolders and files. A must have feature for people who have limited hosting space.) Dynamic display of available free space in the Upload Folder.Limits the size of your upload folder. If the max is reached uploads will be disabled. |  |  |
Max File size upload |  | You can place limits on the file size, height, and width of images that you and your users can upload. You can choose to auto-resize the over-sized images. You may also specify a list of file extensions which are allowed to be uploaded. | none or limited |  |
Powerful image gallery |  | Built-in thumbnail generator. Thumbnail images are dynamically created; View, Insert, Copy, Rename, or Delete images.Create, rename and delete image directories. | none or limited |  |
Link management |  |  |  |  |
Relative or Absolute URLs |  | With Rich Text Editor, you have the choice of using either a relative or absolute URL. | none or limited |  |
Anchor/bookmark support |  | Anchors can be added, edited and removed anywhere within the content of the editor. When creating hyperlinks all anchors present in the content will dynamically show up in the hyperlink window. |  |  |
Clickable Image Maps | Clickable Image Maps | Image maps are pictures with clickable regions also known as "hotspots." When users click on one of the hotspots, they're directed to the page you designate. RichTextEditor 5.2 lets you easily create image maps to add fun and excitement to a page. |  |  |
Downloadable files support |  | You can upload document files, create a link from your HTML content to the document files (zip files, ppt files...). | none or limited |  |
Web Standards Support |  |  |  |  |
Compliant with the web standards, no deprecated tags such as <FONT> anymore |  | Does your online html editor still use deprecated tags such as <FONT>? Rich Text Editor will help you build sites that adhere to the latest HTML standards, generates clean HTML/XHTML code with no deprecated tags. | none or limited |  |
Output HTML or well-formed XHTML to your choice |  | Rich Text Editor supports output well-formed XHTML. Your choice of XHTML 1.0 or HTML 4.01 output. |  |  |
Accessibility Support |  |  |  |  |
Support accessibility according to W3C WAI and section 508 accessibility guidelines. |  | Rich Text Editor optional accessibility settings ensure your site complies with Section 508, so people with disabilities can have full access to your content. <caption>,<summary>,<thead>,<tfoot>,<th> tags are supported. | none or limited |  |
Long Description Names |  | Sometimes you may need to provide more explanation or content than is suitable for alt text. In these cases, you can use the long description (longdesc) attribute for the IMG element. | varies |  |

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


Requirements

Browser Compatibility:

RichTextEditor control will automatically determine the browser that has requested the page and render the appropriate solution for that browser. However, some control features cannot be rendered on older browsers.

Uplevel Browsers

Browsers are split into two distinctive groups: "uplevel" (newer versions) and "downlevel" (earlier versions). Uplevel browsers are defined as IE 10.0, IE 9.0, all Internet Explorer versions from 6.0 up on Windows, Firefox 2.0+, Chrome, Mozilla 1.3+, Netscape 7+, Opera 9.x and Safari (1.3+). This includes Macintosh and Linux. RichTextEditor will render rich UI in uplevel browsers.

Windows (all) | Mac OS X/Linux/Unix
Internet Explorer 10.0 Internet Explorer 9.0 Internet Explorer 6.0+ Chrome Firefox 2.0+ Netscape 9.0 Opera 9.x Safari 2.0+ | Chrome Firefox 2.0+ Netscape 9.0 Safari 2.0+ Mozilla 1.4+ Or any browser based on Mozilla 1.4+

Downlevel Browsers

Downlevel Browsers are split into different groups as well. By further determining browser capabilities, RichTextEditor may render as simple UI, BBCode Editor, Mobile UI(iPad, iPhone, Android) or a regular textarea.

Render Mode | Browser Capabilities
Mobile UI | Browsers of iPad, iPhone, Android or other mobile devices.
Simple UI | Browsers(IE 5, Firefox 1.0, Netscape 7.1, Safari 1.3, Netscape 7.1) have basic WYSIWYG support.
BBCode | Browsers support Javascript.
Textarea | None of the above.

Keep in mind that you don't need a supported browser to see HTML pages generated using Rich Text Editor, you just need a supported browser to edit with Rich Text Editor.

Rich Text Editor is pure JavaScript and HTML in the browser, it requires no browser plug-ins, ActiveX controls or Java Applets.

Web Server Requirements:

  • Web Server: IIS
  • Scripting Language: Classic ASP
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


What's New - Better organized interface

Better organized interface

This version comes with fully reworked Ribbon interface. It mimics the look and feel of popular text processor applications such as Microsoft Word. From the new word-like toolbars and contextual menus to the more subtle changes in labels and tooltips, RichTextEditor aims to make you feel comfortable editing online content:

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


What's New - Quick Property Editor

Quick Property Editor

The new Quick Property Editor functionality in Rich Text Editor 8 enables you to view and modify object properties for selected objects. The simplified list makes it easier for you to locate the property you want to edit. Also, the Quick Property Editor is displayed right at the cursor when you select an object. Quick Property Editor shows only the most common attributes, but provides a richer set of controls for changing those attributes's values.

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


What's New - Improved CSS Style Dropdown

Improved CSS Style Dropdown

The CSS Style Dropdown functionality in Rich Text Editor 8 has been significant improved. You can create a cascading style sheet file in which to define all the styles you need when editing content, and then use the file within the editor. Its content (styles) will be displayed in the Style drop-down menu. Unlike the previous version, both styles and classes are rendered in the drop-down menu as they will look in page so that you can easily pick the correct one.

Quick style

There is a new feature called quick style in 8.0. Quick style provides a fast and easy way to save a new style. Say you spent some time formatting text just the way you want it and you want to save that format as a style so you can use it again in your current document.

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


What's New - Powerful image editor

Powerful image editor

One of the revolutionary features of Rich Text Editor 8 is the new image editor. In previous versions of Rich Text Editor, you had to edit images using IE browser only. With Rich Text Editor 8, you can process images directly on your server using Chrome, Firefox, Opera and Mozilla.

With online image editor, you can now edit image file with no image editing software to download or install! Easy drag and drop familiar interface. Resize, change dimensions, scale, crop, add text, optimize, rotate, flip, mirror and add watermark.

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


What's New - Format Painter

Format Painter

The Format Painter takes the formatting from one piece of text and pastes it onto content you select. This is handy when you have a combination of formats on something, like a size, color and style, and want to apply them to another item, without having to apply them individually.

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


What's New - HTML5 Support

HTML5 Support

HTML5 will be the new standard for HTML. Major browsers support many of the new HTML5 elements and APIs. RichTextEditor is providing support for various HTML5 elements, attributes, and values.

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


What's New - Show Rulers

Show Rulers

RichTextEditor can display rulers, one along the top and one along the left side of the editor window. Rulers allow you easiluy align text, graphics, tables, and other elements in a document.

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


What's New - Powerful File Manager

Powerful File Manager

A powerful file manager in Rich Text Editor 8 helps you to easily manage images, document, videos and template files. This full featured file manager helps you copy, delete, move, search, and organize your files on the server.

Image Gallery Dialog

Insert Image Dialog

File Search - You can use FileManager to search files and directories.
File Upload - Allows you to select and upload multiple files at once.
Image Dimensions
Context Menu
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


What's New - Filter HTML code

Filter HTML code

The new Filter HTML code functionality in Rich Text Editor 8 allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes.

TagWhiteList | Allows you set a list of html tags that will not be removed from content sources.
TagBlackList | Allows you set a list of html tags that will be removed from content sources.
AttrWhiteList | Allows you set a list of html attributes that will not be removed from content sources.
AttrBlackList | Allows you set a list of html attributes that will be removed from content sources.
StyleWhiteList | Allows you set a list of style attributes that will not be removed from content sources.
StyleBlackList | Allows you set a list of style attributes that will be removed from content sources.
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Deploying RichTextEditor

The following guide shows the steps to implement a RichTextEditor Control into ASP applications. If you haven't downloaded the software, please download it from here.

1. Install the RTE

The "richtexteditor" folder and all files it contains should be deployed to the application directory of your website.

2. Using the Editor in an ASP page

CopyCode image Copy Code
<% @ Language="VBScript" %>
<!-- Step 1: Register Uploader to your page -->
<!-- #include file="aspuploader/include_aspuploader.asp" -->
<html>
<body>
    <div>
    <%
        'Step 2: Create Uploader object
        Dim uploader
        Set uploader=new AspUploader
        'Step 3: Set a unique name to Uploader
        uploader.Name="myuploader"
        uploader.SaveDirectory="savefiles"
        uploader.AllowedFileExtensions="*.jpg,*.png,*.gif"
        'Step 4: Render Uploader
        uploader.Render()
    %>
    </div>
</body>
</html>

3. Retrieving the RTE content

You can retrieve the RTE contents using Request.Form method. The name of the variable will be RTE ID. For example if your RTE class ID is "Editor1", the variable would be Request.Form("Editor1").

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


Setting temporary file location

We integrated a hi-performance ASP upload component - ASP Uploader into Rich Text Editor. ASP Uploader allows you to select and upload multiple files at once. It also supports client side validation of the file size/type before uploading.

ASP Uploader does not read the entire uploaded file into memory. It streams the data into a temporary file while the data is received. For this reason, you must specify a temporary file location. You should ensure that the Internet Guest Account has read/write permission to this specified folder.

You can easily specify the temporary file location by setting uploader's TempDirectory property:

// Register Editor component to your page
<!-- #include file="richtexteditor/include_rte.asp" -->
<html>
<body>
        <form id="form1" method="POST">
            <%
                // Create Editor instance and use Text property to load content into the RTE.
                Set rte=new RichTextEditor
                rte.Text="Type here"
                // Set a unique ID to Editor
                rte.ID="Editor1"
                // Set a temporary file location
                rte.TempDirectory="/mytempfolder"
                rte.MvcInit()
                // Render Editor
                Response.Write(rte.GetString())
            %>
        </form>
</body>
</html>

If there is no temporary file location specified, RichTextEditor will use the system's temp folder.

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


Applying styles to Editor Window

There are many options which allow you apply your own css styles to Editing window and Preview window.

The following is the list of available settings.

Property Description
ContentCss
 Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported.

Example:

rte.ContentCss="example.css,/default.css"

ContentCssText
 Gets or sets inline CSS text that will be used by the editable area.

Example:

rte.ContentCssText="p{font:Normal 12px 'Segoe UI'} .exampleclass{font-weight: bold}"

EditorBodyClass
 Specifies the Class name that will be added to the body of the editor document.

Example:

rte.EditorBodyClass="mybodyclass1"

EditorBodyId
 Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported.

Example:

rte.EditorBodyId="mybodyId1"

EditorBodyStyle
 Specifies the css style that will be applied to the body of the editor document.

Example:

rte.EditorBodyStyle="font-family: arial;font-size:13px;"

PreviewCss
 Specifies the location of the style sheet that will be used by the preview window. Multiple Style Sheets are supported.

Example:

rte.PreviewCss="example.css,/default.css"

PreviewCssText
 Gets or sets inline CSS text that will be used by the preview window.

Example:

rte.PreviewCssText="div,p{font:Normal 12px 'Segoe UI'}"
Send feedback about this topic to CuteSoft. ©2003 - 2018 CuteSoft Components Inc. All rights reserved.


Toolbar Overview

Many functions of RichTextEditor are accessible via the toolbars, context menus (accessible through a right-click menu in the content area). This section contains reference documentation for all of the toolbars customization.

Most toolbar configuration settings have been moved to the configuration file (richtexteditor\scripts\config.js). These configurations are applied using Toolbar property. Each configuration setting defines the set of available tools, their layout, and specific options.

Default Toolbar Setting

CopyCode image Copy Code
toolbars:
{
  "ribbon":"<@COMMON,ribbonpaste,pastetext,pasteword,{save,new,print,spellcheck}{cut,copy,delete,find}{undo,redo|formatpainter}>
          <@FORMAT,[fontname,fontsize]{bold,italic,underlinemenu|forecolor,backcolor}{superscript,subscript,changecase|removeformat,cleancode,selectall}>
          <@PARAGRAPHS,[paragraphs,styles]{justifymenu,lineheight,ltr,rtl,insertlinemenu}{insertorderedlist,insertunorderedlist,outdent,indent,insertblockquote}>
          <@INSERT,ribbontable,insertgallery,insertimage,{insertform,insertbox,insertlayer,insertfieldset,fullscreen,toggleborder,pageproperties,help}
          {insertlink,unlink,insertanchor,insertimagemap,insertdate,insertchars,virtualkeyboard}
          {inserttemplate,insertdocument,insertmedia,syntaxhighlighter,insertyoutube,html5,googlemap}>",
  "full":"{save,new,print,find,spellcheck}{cut,copy,paste,pastetext,pasteword,delete}{undo,redo}{formatpainter}{inserttable,insertbox,insertlayer,insertfieldset}
          {insertform}{insertchars,syntaxhighlighter,virtualkeyboard,insertdate}{pageproperties,help}/
          {bold,italic,underlinemenu,justifymenu,forecolor,backcolor}{lineheight,ltr,rtl}{insertlinemenu}{superscript,subscript,changecase}
          {insertorderedlist,insertunorderedlist,outdent,indent,insertblockquote}{removeformat,cleancode}{fullscreen,toggleborder,selectall}/
          [paragraphs,styles][fontname,fontsize]{insertlink,unlink,insertanchor,insertimagemap}
          {insertgallery,insertimage,insertmedia,inserttemplate,insertdocument,insertyoutube,html5,googlemap}",
  "lite":"{cut,copy,paste,pastetext,pasteword,delete}{undo,redo}{spellcheck,find}{formatpainter}{insertlink,unlink}{insertlinemenu}{inserttable,insertbox}
          {insertgallery,insertimage,insertdocument,insertmedia,insertyoutube,inserttemplate}{removeformat,cleancode}{fullscreen,toggleborder,selectall}{help}/
          [paragraphs,styles][fontname,fontsize]{bold,italic,underlinemenu}{forecolor,backcolor}{superscript,subscript,changecase}
          {justifymenu,insertorderedlist,insertunorderedlist,outdent,indent,insertblockquote}",
  "forum": "{bold,italic,underline}{forecolor,backcolor,fontname,fontsize}{justifymenu}{insertorderedlist,insertunorderedlist,outdent,indent}
          {insertlink,insertgallery,insertimage,insertblockquote,syntaxhighlighter}{unlink,removeformat}",
  "email": "{bold,italic,underline,fontname,fontsize,forecolor,backcolor}{insertlink,unlink,insertorderedlist,insertunorderedlist}
          {outdent,indent,insertblockquote,justifyleft,justifycenter,justifyright,removeformat}",
  "minimal": "{bold,italic,underline,justifyleft,justifycenter,justifyright,justifyfull,justifynone}",
  "none":""
}

Note that in the code above seven toolbar definitions have been defined. The first one is named ribbon and the second one is full. You can use Editor.Toolbar property to apply toolbar definition.

Toolbar groups

Your toolbar layout may contain many toolbar buttons instead of small selection of buttons. So you need to put the buttons into different toolbar groups. The final toolbar layout is composed of a series of "toolbar groups". The group items move together on new rows when resizing the editor.

You can use the following methods to create toolbar groups.

{bold, italic}
[bold, italic]
(bold, italic)

Toolbar Separator

Within Toolbar groups, you can add toolbar separators between a group of toolbar buttons.

You can use the "|" string to create separators.

{bold, italic | Cut,Copy,Paste}
[bold, italic | Cut,Copy,Paste]
(bold, italic | Cut,Copy,Paste)

Toolbar Row Break

You can split toolbar layout by inserting a toolbar row break. The toolbar row break can be used to tell the editor that you want to force the Toolbar groups to be rendered in a new row and not following the previous one.

You can use the "-","_" or "/" string to create toolbar row breaks.

{bold, italic | Cut,Copy,Paste}-{Indent, Outdent | Superscript,Subscript}
[bold, italic | Cut,Copy,Paste]_[Indent, Outdent | Superscript,Subscript]
(bold, italic | Cut,Copy,Paste)/(Indent, Outdent | Superscript,Subscript)

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


Configuring Toolbar

It is very easy to customize the layout of the toolbars in RichTextEditor. You can add or remove buttons, and change their placement. Beyond this, you may also add your own tools to the toolbar, create your own toolbars, or create custom icons for your toolbar!

Loading Predefined Toolbar

RichTextEditor provides several predefined toolbars that are useful for certain tasks. You can simply specify the name of a toolbar using Editor.Toolbar property. The toolbars are defined in the configuration file (richtexteditor\scripts\config.js [image] ). Inside the configuration file you can create as many toolbar definitions as you need.

You can customize toolbars by adding, rearranging or removing buttons. For example, if you have a button you don't use in a toolbar, remove it.

rte.Toolbar="full";

Setting Toolbar Items Directly

RichTextEditor allows you set the toolbar definition in-page. You can assign a custom set of toolbar items using Editor.ToolbarItems property.

rte.ToolbarItems = "bold,italic";

Toolbar groups

Your toolbar layout may contain many toolbar buttons instead of small selection of buttons. So you need to put the buttons into different toolbar groups. The final toolbar layout is composed of a series of "toolbar groups". The group items move together on new rows when resizing the editor.

You can use the following methods to create toolbar groups.

rte.ToolbarItems = "{bold, italic}";
rte.ToolbarItems = "[bold, italic]";
rte.ToolbarItems = "(bold, italic)";

Toolbar Separator

Within Toolbar groups, you can add toolbar separators between a group of toolbar buttons.

You can use the "|" string to create separators.

rte.ToolbarItems = "{bold, italic | Cut,Copy,Paste}";
rte.ToolbarItems = "[bold, italic | Cut,Copy,Paste]";
rte.ToolbarItems = "(bold, italic | Cut,Copy,Paste)";

Toolbar Row Break

You can split toolbar layout by inserting a toolbar row break. The toolbar row break can be used to tell the editor that you want to force the Toolbar groups to be rendered in a new row and not following the previous one.

You can use the "-","_" or "/" string to create toolbar row breaks.

rte.ToolbarItems = "{bold, italic | Cut,Copy,Paste}-{Indent, Outdent | Superscript,Subscript}";
rte.ToolbarItems = "[bold, italic | Cut,Copy,Paste]_[Indent, Outdent | Superscript,Subscript]";
rte.ToolbarItems = "(bold, italic | Cut,Copy,Paste)/(Indent, Outdent | Superscript,Subscript)";

Disabling toolbar items individually

RichTextEditor allows you disable individual toolbar icons using Editor.DisabledItems property.

rte.DisabledItems = "save, help";
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Toolbar Reference

This section lists the menu and toolbar items that are available in RichTextEditor. Button Name is the name used to identify each tool button in the toolbar setting.

Menu/Button | Function Description | Button Name
Paste | Inserts content from the clipboard into the editor at the selected position | paste(ribbonpaste)
Paste Plain Text | Pastes plain text (no formatting) into the editor | pastetext
Paste from word | Pastes the content copied form the Microsoft Word and removes any web-unfriendly tags | pasteword
Save | Saves the active content in the editor's content area | save
New Document | Creates a new document | new
Print | Prints the current page | print
Spell | Launchs the spell checker | spellcheck
Cut | Performs normal function of cutting | cut
Copy | Copies the current selection and stores it in the clipboard | copy
Delete | Deletes the current selection | delete
Find and replace | Finds and allows replacements of text in the editor's content area | find
Undo | Undoes the last operation in the editor | undo
Redo | Redoes the previously undone action | redo
Format painter | Format Painter takes the formatting from one piece of text and pastes it onto content you select. | formatpainter
 | Font name drop-down menu sets the font face. If a selection is active, the font formatting will be applied to it | fontname
 | Size drop-down menu sets the font size. If a selection is active, the font size formatting will be applied to it | fontsize
Bold | Bolds the selected text | bold
Italicize | Italicizes the selected text | italic
Underline | Underlines the selected text | underline
Strike Through | Strikes through the selected text | linethrough
Overline | Overline the selected text | overline
Font Color | Changes the color of the selected text to desired color | forecolor
Highlight | Highlights the selected text | backcolor
Superscript | Changes the selected text to superscript | superscript
Subscript | Changes the selected text to subscript | subscript
Upper Case | Converts the selected text to upper case lettering | ucase
Lower Case | Converts the selected text to lower case lettering | lcase
Remove Format | Removes formatting from the selected text | removeformat
Code Cleaner | Cleans up all "garbage" HTML-tags | cleancode
Select All | Selects all content | selectall
 | Paragraph drop-down menu changes the paragraph style of the selected text | paragraphs
 | Style drop-down menu changes the CSS class and CSS style of the selected text | styles
Justify Left | Aligns the selected content to the left | justifyleft
Justify Center | Centers the selected content | justifycenter
Justify Right | Aligns the selected content to the right | justifyright
Justify Full | Stretches the lines so that each line has equal width | justifyfull
Justify None | The justification is disabled | justifynone
Line Height | Set the line height in percent | lineheight
Left to right | Set the text direction to "left-to-right" | ltr
Right to left | Set the text direction to "right-to-left" | rtl
Break | Inserts a line break (br) | insertlinemenu
Insert WBR (HTML5) | Inserts a line break (wbr) | Insertwbr
Insert div line break | Inserts a line break (div) | insertdiv
Paragraph | Inserts a paragraph (p) | insertparagraph
Insert Rule | Inserts a horizontal rule at the selected position in the editor | inserthorizontalrule
Insert Page Break | Inserts a print page break | insertpagebreak
Insert top line | Inserts a line break in the top of the document | inserttopline
Insert bottom line | Inserts a line break in the bottom of the document | insertbottomline
Ordered List | Inserts an ordered list | insertorderedlist
Unordered List | Inserts an unordered list | insertunorderedlist
Indent | Indents the selected content | indent
Outdent | Outdents the selected content | outdent
Insert blockquote | Inserts a block quote into your document | insertblockquote
Insert Table | Inserts a table into your document | inserttable(ribbontable)
Image gallery | Inserts a local image from the image gallery folder; thumbnail images are dynamically created and supports uploading of new images | insertgallery
Insert image | Inserts an image at the selected position in the editor and allows you to set it's properties | insertimage
Form | Inserts a form at the selected position | insertform
TextArea | Inserts a textarea at the selected position | inserttextarea
Input Text Box | Inserts an input text box at the selected position | insertinptext
Password field | Inserts a password field at the selected position | insertinppassword
Hidden field | Inserts a hidden field at the selected position | insertinphidden
ListBox | Inserts a list box at the selected position | insertinpfile
Dropdown Box | Inserts a dropdown box at the selected position | insertdropdown
Radio Button | Inserts a radio button at the selected position | insertradiobox
Checkbox | Inserts a checkbox at the selected position | insertcheckbox
Image Button | Inserts an image button at the selected position | insertinpimage
Submit Button | Inserts a submit button at the selected position | insertinpsubmit
Reset Button | Inserts a reset button at the selected position | insertinpreset
Input Button | Inserts an input button at the selected position | insertinpbutton
Insert a layout box | Inserts a layout box on your web page creates a DIV tag and set its formatting | insertbox
Insert a layer | Allows you to insert a layer (absolutely-positioned div) | insertlayer
Insert groupbox | Allows you to a group box (FieldSet) at the selected position in the editor | insertfieldset
HTML5 tags | Allows you to insert HTML5 tags | html5
Toggle Border | Toggles the visibility of borders | toggleborder
Fit to window | Edits in full screen mode, maximizing your available space | fullscreen
Help | Displays a user guide | help
Insert Link | The image button allows you add a link to the text. The arrow button allows you add predefined links into the current selection | insertlink
Remove Link | Removes the hyperlink from the selected content | unlink
Insert Anchor | Adds an anchor to the text on your page | insertanchor
Add image map | Adds an image map | insertimagemap
Insert date and time | Inserts the current date and time. The date format used is the date format configured on the client's machine | insertdate
Special Chars | Inserts a special character from a predefined list | insertchars
Universal Keyboard | Universal Online Keyboard | virtualkeyboard
Page Properties | Allows you modify the page properties | pageproperties
Insert Template | The image button allows you add the predefined templates into the current selection. The arrow button allows you add predefined code snippets into the current selection. | inserttemplate
Insert Document | Inserts a link to a document on the server (PDF,DOC, ZIP,etc.) at the selected position | insertdocument
Insert video | Inserts a video at the selected position and allows you to set it's properties | insertmedia
SyntaxHighlighter | Allows you to easily post syntax highlighted code | syntaxhighlighter
YouTube | Embeds a youtube video at the selected position and allows you to set it's properties. | insertyoutube
Google map | Inserts a Google map at the selected position. | googlemap

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


Security Policy File

Rich Text Editor allows developers to assign a pre-defined set of permissions by group or individual. This prevents a normal user to access the administration functionalities.

The details of permissions are specified by an XML security policy file. Each level maps to a specific file. The default mappings:

  • admin - maps to admin.config
  • default - maps to default.config
  • guest - maps to guest.config

You can customize and extend each policy file by editing the XML security policy file. You can also create your own policy files that define arbitrary permission sets.

The security policy file (default.config, admin.config and guest.config) can be found in the richtexteditor/config folder. You can use Editor.SecurityPolicyFile property to apply security to control user access to resources.

A security policy file example:

<?xml version="1.0" encoding="utf-8" ?>
<rteconfig>
    <security name="TagBlackList">script,style,link,applet,bgsound,meta,base,basefont,frameset,frame,form</security>
    <security name="AttrBlackList">runat,action</security>
    <security name="StyleBlackList">position,visibility,display</security>
    <security name="DrawWatermarks">true</security>
    <!--allow,resize,deny-->
    <security name="LargeImageMode">resize</security>
    <security name="MaxImageWidth">0</security>
    <security name="MaxImageHeight">768</security>
    <security name="MaxFileSize">1000</security>
    <security name="MaxFolderSize">102400</security>
    <security name="AllowUpload">true</security>
    <security name="AllowCopyFile">true</security>
    <security name="AllowMoveFile">true</security>
    <security name="AllowRenameFile">true</security>
    <security name="AllowDeleteFile">true</security>
    <security name="AllowOverride">true</security>
    <!--upload/copy/move-->
    <security name="AllowCreateFolder">true</security>
    <security name="AllowCopyFolder">true</security>
    <security name="AllowMoveFolder">true</security>
    <security name="AllowRenameFolder">true</security>
    <security name="AllowDeleteFolder">true</security>
    <security name="FilePattern">^[a-zA-Z0-9\._\s-]+$</security>
    <security name="FolderPattern">^[a-zA-Z0-9\._\s-]+$</security>
    <category for="Gallery,Image">
        <security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
        <security name="MimeTypes">image/*</security>
        <storage id="default">
            <security name="StoragePath">~/uploads</security>
            <security name="StorageName">Image Files</security>
        </storage>
    </category>
    <category for="Video">
        <security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
        <storage id="default">
            <security name="StoragePath">~/uploads</security>
            <security name="StorageName">Video Files</security>
        </storage>
    </category>
    <category for="Document">
        <security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar</security>
        <storage id="default">
            <security name="StoragePath">~/uploads</security>
            <security name="StorageName">Document Files</security>
        </storage>
    </category>
    <category for="Template">
        <security name="Extensions">*.txt,*.htm,*.html</security>
        <storage id="default">
            <security name="StoragePath">~/templates</security>
            <security name="StorageName">Templates</security>
        </storage>
    </category>
</rteconfig>

If you want to add new folders as template path, you need to create new storages and specify the storgae ID, name, path.

<category for="Template">
       <storage id="newtemplatepath>
              <security name="StorageName">New Template</security><!-- storage display name -->
              <security name="StoragePath">~/newtemplatepath</security>
       </storage>
       <storage id="newtemplatepath2>
              <security name="StorageName">New Template2</security><!-- storage display name -->
              <security name="StoragePath">~/newtemplatepath2</security>
       </storage>
</category>

Programmatically apply security settings

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

Editor.SetSecurity Method

public void SetSecurity(string category, string storageid, string configname, string configvalue)

Parameters:

{string} category The name of the category to which the security setting should be applied. "Gallery" indicates the insert gallery dialog. "*" indicates all dialogs.
{string} storageid The ID of the storage to which the security setting should be applied. The default storage ID is "default".
{string} configname The name of the security setting.
{string} configvalue The value of the security setting.

Example 1. A setting applies to all dialogs

rte.SetSecurity("*","default","AllowUpload","true")

This is equivalent to the following code:

<security name="AllowUpload">true</security>

Example 2. A setting applies to insert gallery dialog only

rte.SetSecurity("Gallery","default","AllowUpload","true")

This is equivalent to the following code:

<category for="Gallery"><!-- Gallery Dialog -->
       <storage id="default>
            <security name="AllowUpload">true</security>
       </storage>
</category>

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


Setting up the Image Gallery Path

To enable the image management function of the RichTextEditor control, you must set up a managed image gallery folder.

This is simply a folder in which you will be placing images for your users to use in their content. Create a folder in your application's root folder. The folder can be named something like "/uploads/", "/images" or "/UserImages".

Make sure that the Internet Guest Account has Read+Write permissions on this folder and its contents.

How to specify the Image gallery path?

You can easily specify the image gallery path using the following methods:

Edit 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 following code which defines the image gallery path information within RichTextEditor. By default, insert gallery dialog and insert image dialog share the same value:

<category for="Gallery,Image">
       <security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
       <security name="MimeTypes">image/*</security>
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Image Files</security><!-- storage display name -->
       </storage>
</category>

If you want insert gallery dialog and insert image dialog have the different settings, you need to create separate categories for gallery dialog and image dialog:

<category for="Gallery"><!-- Image Gallery Dialog -->
       <security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
       <security name="MimeTypes">image/*</security>
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Image Files</security><!-- storage display name -->
       </storage>
</category>

<category for="Image"><!-- Insert Image Dialog -->
       <security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
       <security name="MimeTypes">image/*</security>
       <storage id="default>
              <security name="StoragePath">~/uploads2</security>
              <security name="StorageName">Image Files</security><!-- storage display name -->
       </storage>
</category>

If you want to add new folders as image gallery path, you need to create new storages and specify the storgae ID, name, path.

<category for="Gallery,Image">
       <storage id="newimagepath>
              <security name="StorageName">New Images</security><!-- storage display name -->
              <security name="StoragePath">~/newimagepath</security>
       </storage>
       <storage id="newimagepath2>
              <security name="StorageName">New Images2</security><!-- storage display name -->
              <security name="StoragePath">~/newimagepath2</security>
       </storage>
</category>

Programmatically specify the Image gallery path

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

1. Set insert gallery path using the default storage

rte.SetSecurity("Gallery", "default", "StoragePath", "~/uploads")
rte.SetSecurity("Gallery", "default", "StorageName", "Uploads")

This is equivalent to the following code:

<category for="Gallery"><!-- Image Gallery Dialog -->
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Image Files</security><!-- storage display name -->
       </storage>
</category>

2. Create a new storage for insert gallery dialog/insert image dialog and specify the ID, name and path

rte.SetSecurity("Gallery", "newimagepath", "StoragePath", "~/newimagepath")
rte.SetSecurity("Gallery", "newimagepath ", "StorageName", "New Images")
rte.SetSecurity("Image", "newimagepath", "StoragePath", "~/newimagepath")
rte.SetSecurity("Image", "newimagepath ", "StorageName", "New Images")

This is equivalent to the following code:

<category for="Gallery,Image">
       <storage id="newimagepath>
              <security name="StorageName">New Images</security>
              <security name="StoragePath">~/newimagepath</security>
       </storage>
</category>

3. To programmatically disable a storage access, you can use the following method:

rte.SetSecurity("Gallery", "newimagepath", "AllowAccess", "false")

In the above code, insert gallery dialog access to a storage is disabled. The storage ID in the above code is "newimagepath".

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


Restricting image uploads using extension and MIME types

RichTextEditor has the capability to allow or restrict uploading image files by extensions and types. You can filter the type of image files you want to upload so only specified file types are allowed.

RichTextEditor also automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). If you want to upload uncommon types of files, you may need to add the appropriate information into the security policy files:

How to allow or restrict uploading image files by extensions and types?

You can allow or restrict uploading image files by extensions and types using the following methods:

Edit 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 following code which defines allowed image file extensions within RichTextEditor. You can modify this settings to meet your own requirements.

<category for="Gallery,Image">
       <security name="Extensions">*.jpg,*.jpeg,*.gif,*.png</security>
       <security name="MimeTypes">image/*</security>
</category>

Programmatically validate file type and file extension when uploading

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

rte.SetSecurity("Gallery,Image", "default", "Extensions", "*.gif,*.png")
rte.SetSecurity("Gallery,Image", "default", "MimeTypes", "image/*")
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Restricting image uploads by dimensions

RichTextEditor has the capability to allow or restrict uploading image files by dimensions.

You can set maximum allowed dimensions using the following methods:

Set maximum allowed dimensions 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 following code which defines maximum allowed image dimensions within RichTextEditor. You can modify this settings to meet your own requirements.

<security name="MaxImageWidth"">0</security><!-- A value of 0 (zero) means unlimited -->
<security name="MaxImageHeight">100</security>
</category>

Programmatically set maximum allowed dimensions

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

rte.SetSecurity("*", "*", "MaxImageWidth", "0")
rte.SetSecurity("*", "*", "MaxImageHeight", "1000*")

Allow/Deny/Allow large image uploading

In security policy file you can find the security setting LargeImageMode. This setting defines exactly what will happen to the Images larger than the maximum dimensions set in the settings.

LargeImageMode setting has three values:

  • allow - All Images larger than the maximum dimensions will be allowed when uploading.
  • deny - All Images larger than the maximum dimensions will be rejected when uploading.
  • resize - All Images larger than the maximum dimensions will be proportionally resized to fit within the maximum dimensions when uploading.

You can modify this settings to meet your own requirements.

<security name="LargeImageMode">deny</security>

Programmatically allow/deny/allow large image uploading

rte.SetSecurity("*", "*", "LargeImageMode", "deny")
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Setting up the Video Path

To enable the video management function of the RichTextEditor control, you must set up a managed video folder.

This is simply a folder in which you will be placing videos for your users to use in their content. Create a folder in your application's root folder. The folder can be named something like "/uploads/", "/videos" or "/UserVideo".

Make sure that the Internet Guest Account has Read+Write permissions on this folder and its contents.

How to specify the video path?

You can easily specify the video path using the following methods:

Edit 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 following code which defines the video path information within RichTextEditor. By default, insert video dialog has the following settings:

<category for="Video"><!-- Insert Video Dialog -->
       <security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Video Files</security><!-- storage display name -->
       </storage>
</category>

If you want to add new folders as video path, you need to create new storages and specify the storgae ID, name, path.

<category for="Video">
       <storage id="newvideopath>
              <security name="StorageName">New Video</security><!-- storage display name -->
              <security name="StoragePath">~/newvideopath</security>
       </storage>
       <storage id="newvideopath2>
              <security name="StorageName">New Video2</security><!-- storage display name -->
              <security name="StoragePath">~/newvideopath2</security>
       </storage>
</category>

Programmatically specify the video path

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

1. Set video path using the default storage

rte.SetSecurity("Video", "default", "StoragePath", "~/uploads")
rte.SetSecurity("Video", "default", "StorageName", "Uploads")

This is equivalent to the following code:

<category for="Video"><!-- Video Dialog -->
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Video Files</security><!-- storage display name -->
       </storage>
</category>

2. Create a new storage for insert video dialog and specify the ID, name and path

rte.SetSecurity("Video", "newvideopath", "StoragePath", "~/newvideopath")
rte.SetSecurity("Video", "newvideopath ", "StorageName", "New Video")

This is equivalent to the following code:

<category for="Video">
       <storage id="newvideopath>
              <security name="StorageName">New Video</security>
              <security name="StoragePath">~/newvideopath</security>
       </storage>
</category>

3. To programmatically disable a storage access, you can use the following method:

rte.SetSecurity("Video", "newvideopath", "AllowAccess", "false")

In the above code, insert video dialog access to a storage is disabled. The storage ID in the above code is "newvideopath".

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


Restricting video uploads using extension and MIME types

RichTextEditor has the capability to allow or restrict uploading video files by extensions and types. You can filter the type of video files you want to upload so only specified file types are allowed.

RichTextEditor also automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). If you want to upload uncommon types of files, you may need to add the appropriate information into the security policy files:

How to allow or restrict uploading video files by extensions and types?

You can allow or restrict uploading video files by extensions and types using the following methods:

Edit 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 following code which defines allowed video file extensions within RichTextEditor. You can modify this settings to meet your own requirements.

<category for="Video">
       <security name="Extensions">*.swf,*.flv,*.avi,*.mpg,*.mpeg,*.mp3,*.wmv,*.wav,*.mp4,*.mov</security>
</category>

Programmatically validate file type and file extension when uploading

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

rte.SetSecurity("Video", "default", "Extensions", "*.swf,*.flv,*.avi,*.mpg,*.mpeg")
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Setting up the Document Path

To enable the document management function of the RichTextEditor control, you must set up a managed document folder.

This is simply a folder in which you will be placing document for your users to use in their content. Create a folder in your application's root folder. The folder can be named something like "/uploads/", "/documents" or "/UserDocument".

Make sure that the Internet Guest Account has Read+Write permissions on this folder and its contents.

How to specify the document path?

You can easily specify the document path using the following methods:

Edit 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 following code which defines the document path information within RichTextEditor. By default, insert document dialog has the following settings:

<category for="Document"><!-- Insert Document Dialog -->
       <security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.htm,*.xls,*.html,*.rtf</security>
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Document Files</security><!-- storage display name -->
       </storage>
</category>

If you want to add new folders as document path, you need to create new storages and specify the storgae ID, name, path.

<category for="Document">
       <storage id="newdocumentpath>
              <security name="StorageName">New Document</security><!-- storage display name -->
              <security name="StoragePath">~/newdocumentpath</security>
       </storage>
       <storage id="newdocumentpath2>
              <security name="StorageName">New Document2</security><!-- storage display name -->
              <security name="StoragePath">~/newdocumentpath2</security>
       </storage>
</category>

Programmatically specify the document path

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

1. Set document path using the default storage

rte.SetSecurity("Document", "default", "StoragePath", "~/uploads")
rte.SetSecurity("Document", "default", "StorageName", "Uploads")

This is equivalent to the following code:

<category for="Document"><!-- Document Dialog -->
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Document Files</security><!-- storage display name -->
       </storage>
</category>

2. Create a new storage for insert document dialog and specify the ID, name and path

rte.SetSecurity("Document", "newdocumentpath", "StoragePath", "~/newdocumentpath")
rte.SetSecurity("Document", "newdocumentpath ", "StorageName", "New Document")

This is equivalent to the following code:

<category for="Document">
       <storage id="newdocumentpath>
              <security name="StorageName">New Document</security>
              <security name="StoragePath">~/newdocumentpath</security>
       </storage>
</category>

3. To programmatically disable a storage access, you can use the following method:

rte.SetSecurity("Document", "newdocumentpath", "AllowAccess", "false")

In the above code, insert document dialog access to a storage is disabled. The storage ID in the above code is "newdocumentpath".

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


Restricting document uploads using extension and MIME types

RichTextEditor has the capability to allow or restrict uploading document files by extensions and types. You can filter the type of document files you want to upload so only specified file types are allowed.

RichTextEditor also automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). If you want to upload uncommon types of files, you may need to add the appropriate information into the security policy files:

How to allow or restrict uploading document files by extensions and types?

You can allow or restrict uploading document files by extensions and types using the following methods:

Edit 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 following code which defines allowed document file extensions within RichTextEditor. You can modify this settings to meet your own requirements.

<category for="Document">
       <security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.htm,*.xls,*.html,*.rtf</security>
</category>

Programmatically validate file type and file extension when uploading

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

rte.SetSecurity("Document", "default", "Extensions", "*.txt,*.doc,*.pdf")
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Setting up the Template Path

To enable the template management function of the RichTextEditor control, you must set up a managed template folder.

This is simply a folder in which you will be placing templates for your users to use in their content. Create a folder in your application's root folder. The folder can be named something like "/uploads/", "/templates" or "/UserTemplate".

Make sure that the Internet Guest Account has Read+Write permissions on this folder and its contents.

How to specify the template path?

You can easily specify the template path using the following methods:

Edit 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 following code which defines the template path information within RichTextEditor. By default, insert template dialog has the following settings:

<category for="Template"><!-- Insert Template Dialog -->
       <security name="Extensions">*.txt,*.doc,*.pdf,*.zip,*.rar,*.htm,*.xls,*.html,*.rtf</security>
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Template Files</security><!-- storage display name -->
       </storage>
</category>

If you want to add new folders as template path, you need to create new storages and specify the storgae ID, name, path.

<category for="Template">
       <storage id="newtemplatepath>
              <security name="StorageName">New Template</security><!-- storage display name -->
              <security name="StoragePath">~/newtemplatepath</security>
       </storage>
       <storage id="newtemplatepath2>
              <security name="StorageName">New Template2</security><!-- storage display name -->
              <security name="StoragePath">~/newtemplatepath2</security>
       </storage>
</category>

Programmatically specify the template path

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

1. Set template path using the default storage

rte.SetSecurity("Template", "default", "StoragePath", "~/uploads")
rte.SetSecurity("Template", "default", "StorageName", "Uploads")

This is equivalent to the following code:

<category for="Template"><!-- Template Dialog -->
       <storage id="default>
              <security name="StoragePath">~/uploads</security>
              <security name="StorageName">Template Files</security><!-- storage display name -->
       </storage>
</category>

2. Create a new storage for insert template dialog and specify the ID, name and path

rte.SetSecurity("Template", "newtemplatepath", "StoragePath", "~/newtemplatepath")
rte.SetSecurity("Template", "newtemplatepath ", "StorageName", "New Template")

This is equivalent to the following code:

<category for="Template">
       <storage id="newtemplatepath>
              <security name="StorageName">New Template</security>
              <security name="StoragePath">~/newtemplatepath</security>
       </storage>
</category>

3. To programmatically disable a storage access, you can use the following method:

rte.SetSecurity("Template", "newtemplatepath", "AllowAccess", "false")

In the above code, insert template dialog access to a storage is disabled. The storage ID in the above code is "newtemplatepath".

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


Restricting template uploads using extension and MIME types

RichTextEditor has the capability to allow or restrict uploading template files by extensions and types. You can filter the type of template files you want to upload so only specified file types are allowed.

RichTextEditor also automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). If you want to upload uncommon types of files, you may need to add the appropriate information into the security policy files:

How to allow or restrict uploading template files by extensions and types?

You can allow or restrict uploading template files by extensions and types using the following methods:

Edit 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 following code which defines allowed template file extensions within RichTextEditor. You can modify this settings to meet your own requirements.

<category for="Template">
       <security name="Extensions">*.txt,*.htm,*.html</security>
</category>

Programmatically validate file type and file extension when uploading

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

rte.SetSecurity("Template", "default", "Extensions", "*.txt,*.htm,*.html")
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Setting maximum size for file uploads

RichTextEditor limits the size of files to be uploaded to 1 megabytes. You can modify the maximum size for file uploads using the following methods:

Setting maximum size for file uploads 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 MaxFileSize. This setting defines the largest size of file that can be uploaded.

MaxFileSize 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="MaxFileSize">1024</security><!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->

<category for="Video">
       <security name="MaxFileSize">2048</security><!-- This setting applies "Video" dialog only.-->
</category>

<category for="Gallery,Image">
       <security name="MaxFileSize">300</security><!-- This setting applies "Gallery","Image" dialogs only.-->
</category>

Programmatically setting maximum size for file uploads

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

rte.SetSecurity("*", "*", "MaxFileSize", "1024")  <!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->

rte.SetSecurity("Video", "*", "MaxFileSize", "2048")  <!-- This setting applies "Video" dialog only. -->

rte.SetSecurity("Gallery,Image", "*", "MaxFileSize", "300")  <!-- This setting applies "Gallery","Image" dialogs only. -->
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Setting maximum folder size

RichTextEditor allows the developers control the maximum size of folders.

You can modify the maximum folder size using the following methods:

Setting maximum folder size 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 MaxFolderSize. This setting defines the largest size of file that can be uploaded.

MaxFolderSize 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="MaxFolderSize">102400</security><!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->

<category for="Video">
       <security name="MaxFolderSize">204800</security><!-- This setting applies "Video" dialog only.-->
</category>

<category for="Gallery,Image">
       <security name="MaxFolderSize">30000</security><!-- This setting applies "Gallery","Image" dialogs only.-->
</category>

Programmatically Setting maximum folder size

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

rte.SetSecurity("*", "*", "MaxFolderSize", "102400")  <!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->

rte.SetSecurity("Video", "*", "MaxFolderSize", "204800")  <!-- This setting applies "Video" dialog only. -->

rte.SetSecurity("Gallery,Image", "*", "MaxFolderSize", "30000")  <!-- This setting applies "Gallery","Image" dialogs only. -->
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Building your own file name filter

RichTextEditor has taken steps into file name management. A new and innovative capability is to allow advanced developers to build the file name filter. Once a filter has been set, only files whose names comply with the filter, will be displayed in the dialogs and will be enabled to be uploaded to the server. The other files are being "filtered out". 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 file name filter using the following methods:

Building your own file 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 FilePattern. This setting defines the largest size of file that can be uploaded.

FilePattern 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="FilePattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->

<category for="Video">
       <security name="FilePattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies "Video" dialog only.-->
</category>

<category for="Gallery,Image">
       <security name="FilePattern">^[a-zA-Z0-9\._\s-]+$</security><!-- This setting applies "Gallery","Image" dialogs only.-->
</category>

Programmatically building your own file name filter

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

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

rte.SetSecurity("Video", "*", "FilePattern", "^[a-zA-Z0-9\._\s-]+$")  <!-- This setting applies "Video" dialog only. -->

rte.SetSecurity("Gallery,Image", "*", "FilePattern", "^[a-zA-Z0-9\._\s-]+$")  <!-- This setting applies "Gallery","Image" dialogs only. -->
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Building your own folder name filter

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.

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

rte.SetSecurity("Video", "*", "FolderPattern", "^[a-zA-Z0-9\._\s-]+$");  <!-- This setting applies "Video" dialog only. -->

rte.SetSecurity("Gallery,Image", "*", "FolderPattern", "^[a-zA-Z0-9\._\s-]+$");  <!-- This setting applies "Gallery","Image" dialogs only. -->
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Customizing Color Picker

The Colors Panel of RichTextEditor by default displays a predefined set of colors. The colors are defined in the configuration file (richtexteditor\scripts\config.js). You can easily modify this default set by inserting a piece of Javascript code into the page or modify the color array in the configuration file directly.

Default Colors

CopyCode image Copy Code
colorpicker_forecolor	:	["#000000","#993300","#333300","#003300","#003366","#000080","#333399","#333333",
        "#800000","#ff6600","#808000","#008000","#008080","#0000ff","#666699","#808080",
        "#ff0000","#ff9900","#99cc00","#339966","#33cccc","#3366ff","#800080","#999999",
        "#ff00ff","#ffcc00","#ffff00","#00ff00","#00ffff","#00ccff","#993366","#c0c0c0",
        "#ff99cc","#ffcc99","#ffff99","#ccffcc","#ccffff","#99ccff","#cc99ff","#ffffff"],
colorpicker_backcolor	:	["#000000","#993300","#333300","#003300","#003366","#000080","#333399","#333333",
        "#800000","#ff6600","#808000","#008000","#008080","#0000ff","#666699","#808080",
        "#ff0000","#ff9900","#99cc00","#339966","#33cccc","#3366ff","#800080","#999999",
        "#ff00ff","#ffcc00","#ffff00","#00ff00","#00ffff","#00ccff","#993366","#c0c0c0",
        "#ff99cc","#ffcc99","#ffff99","#ccffcc","#ccffff","#99ccff","#cc99ff","#ffffff"],
colorpicker_othercolor	:	["#000000","#993300","#333300","#003300","#003366","#000080","#333399","#333333",
        "#800000","#ff6600","#808000","#008000","#008080","#0000ff","#666699","#808080",
        "#ff0000","#ff9900","#99cc00","#339966","#33cccc","#3366ff","#800080","#999999",
        "#ff00ff","#ffcc00","#ffff00","#00ff00","#00ffff","#00ccff","#993366","#c0c0c0",
        "#ff99cc","#ffcc99","#ffff99","#ccffcc","#ccffff","#99ccff","#cc99ff","#ffffff"],

Defining Colors In-Page

You can easily modify this default set by creating your own color array by using RichTextEditor_OnLoader event.

CopyCode image Copy Code
function RichTextEditor_OnLoader(loader)
{
    loader._config.colorpicker_forecolor=["#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
"#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#C0C0C0"];
    loader._config.colorpicker_backcolor=["#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
"#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#C0C0C0"];
    loader._config.colorpicker_othercolor=["#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
"#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#C0C0C0"];
}

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


Context menu customization

RichTextEditor is a context sensitive application, it is aware of it's context and acts accordingly. Many functions of RichTextEditor are accessible via the context menus (accessible through a right-click menu in the content area). This section describes how to control the context menu behavior in a RichTextEditor control. There are many ways to control the context menu behaviors within RichTextEditor:

Disabling the context menu.
Loading the different configuration file dynamically using Editor.ContextMenuMode property.
Editing the context menu configuration files directly.

Disabling the Default Context Menu

To turn off context menus, you can set Editor.EnableContextMenu Property to false.

Loading the different configuration file dynamically using Editor.ContextMenuMode property.

rte.ContextMenuMode="default"

rte.ContextMenuMode="simple"

rte.ContextMenuMode="minimal"

Editing the context menu configuration files directly.

The context menu definition files (menu_context.xml, menu_context_default.xml, menu_context_minimal.xml and menu_context_simple.xml) can be found in the richtexteditor/dialogs folder. The context menu definition influences the available context menu items and the order of the context menu items. You can easily customize the context menu to address your unique needs.

A context menu definition file example:

<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
    <panel jsml-class="menu_context_table" jsml-base="floatmenu">
        <panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
        <panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
        <panel jsml-base="rtemenuspliter" />
        <panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow"  />
        <panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol"  />
        <panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t"  />
        <panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b"  />
        <panel jsml-base="rtemenuspliter" />
        <panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l"  />
        <panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
    </panel>
        ...
</jsml>
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Extending RTE with its JavaScript API

Extending RichTextEditor with its JavaScript API

RichTextEditor makes it easy for you to extend RichTextEditor with it's JavaScript API.

Getting the RichTextEditor Instance by ID

In order to find the active editor by its ID, you would type:

// get the rich text editor instance
var editor1 = document.getElementById('<%=rte.ID %>').editor;

Please note that there are other methods to get the editor instance. For details, please check editor events.

Getting the Active Editor Window

In order to find the active editor window, you would type:

// get the active editor window
var editor1 = document.getElementById('<%=rte.ID %>').editor;
var editwin = editor1.GetWindow();

Getting the Active Editor Document

In order to find the active editor document, you would type:

// get the active editor document
var editor1 = document.getElementById('<%=rte.ID %>').editor;
var editwin = editor1.GetWindow();
var editdoc = editwin.document;

Getting an Array of the Selected Nodes

In order to an array of the selected nodes, you would type:

// get an array of the selected nodes
var editor1 = document.getElementById('<%=rte.ID %>').editor;
var selnodes = editor1.ExtractRangeNodes();

Retrieves the HTML contained within the selection range

In order to get the HTML contained within the selection range, you would type:

// get the HTML contained within the selection
var editor1 = document.getElementById('<%=rte.ID %>').editor;
var selhtml = editor1.ExtractRangeHTML();
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Client Side Configuration

Configuration for RichTextEditor can be set in the client side in conjunction with server side settings. The client-side settings are collected in a javascript file (richtexteditor\scripts\config.js). Unlike server side settings change configuration specifically for that instance of the Editor, the client-side settings will apply all instances of your editor objects.

A client side configuration file example:

// this file stores the default settings for RichTextEditor
// some settings are overrided by server settings
window.RTE_Configuration =
{
      version          :    "2012-08-20-A",
      skin             :    "office2007blue",//sets the skin for how the toolbar is draw
      toolbar          :    "full",//auto configures the toolbar with a set of buttons
      autofocus        :    false,//specifies whether the editor grabs focus when the page loads
      readonly         :    false,//specifies whether editor is read-only
      showrulers       :    false,//specifies whether to display horizontal and/or vertical rulers
      showlinkbar      :    true,//specifies whether to display the link editing box
      showtoolbar      :    true,//specifies whether to display the editor toolbar
      showtoolbar_code :    true,//specifies whether to display the code mode toolbar
      showtoolbar_view :    true,//specifies whether to display the preview toolbar
      showbottombar    :    true,//specifies whether to display the editor bottom bar
      showeditmode     :    true,//specifies whether to display the edit mode button in the bottom bar
      showcodemode     :    true,//specifies whether to display the code mode button in the bottom bar
      showpreviewmode  :    true,//specifies whether to display the preview mode button in the bottom bar
      showtaglist      :    true,//specifies whether to display the tag selector in the bottom bar
      showzoomview     :    true,//specifies whether to display a zoom factor drop down in the bottom bar
      showstatistics   :    true,//specifies whether to display the content statistics in the bottom bar
      showresizecorner :    true,//specifies whether to display the resize handle at the corner of the editor
      resize_mode      :    "resizeboth",     //"disabled","autoadjustheight","resizeheight","resizewidth","resizeboth" gets or sets the resize mode
      enabledragdrop   :    true,//specifies whether to enable drag-and-drop support for the editor
      enablecontextmenu:    true,//specifies whether to display the context menu
      enableobjectresizing: true,//specifies whether to enable the object resizing
      autoparseclasses :    true,//specifies whether or not the Editor should automatically parse the CSS classes from ContentCss
      initialtabmode   :    "edit",    //"edit","code","view"
      initialfullscreen:    false,//specifies whether the Editor is used in a full-screen mode
      initialtoggleborder:  true,//specifies the ToggleBorder state
      maxhtmllength    :    0,//specifies the maximum number of characters including the HTML tags allowed. Default is 0, indicating no maximum
      maxtextlength    :    0,//specifies the maximum number of characters excluding the HTML tags allowed. Default is 0, indicating no maximum
      editorbodyclass  :    "",//specifies the class name that will be added to the body of the editor document
      editorbodystyle  :    "",//specifies the css style that will be applied to the body of the editor document
      insertparagraph  :    'p',//default tag for insertparagraph
      unlistparagraph  :    'p',//default tag for unlistparagraph
      justifyparagraph :    'p',//default tag for justifyparagraph
      enterkeytag      :    'p',//default tag for enterkeytag
      shiftenterkeytag :    'br',//default tag for shiftenterkeytag
      insertbodyline   :    '<p>&nbsp;</p>',//default code for inserttopline
      ...
}

Modifying the configuration using server side method:

The modifying in the client side configuration file will apply all instances of your editor objects. However when you upgrade your RTE with newer versions, this file may be overwritten. To avoid losting the changes, we suggest you use the following server side method (Editor1.SetConfig) overwrite the setting.

Editor1.SetConfig("skin","office2010blue");
Editor1.SetConfig("showrulers",true);
Editor1.SetConfig("showbottombar",false);

Modifying the configuration using client side method:

It is also very easy to overwrite the configuration using client side method.

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.showrulers=true; //Shows horizontal and vertical rulers.
    config.showbottombar=false;//Shows the editor bottom bar.
    config.skin="office2010blue";//Sets the skin.
}
</script>

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.SetWidth(1000); //Sets the width.
    editor.SetHeight(500); //Sets the height.
}
</script>
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Event Model

An event is a notification that occurs in response to an action, such as a text change in editor, or as a result of the user clicking the toolbar button while editing the document. An event handler is code written in javascript language, that receives control when the corresponding event occurs.

RichTextEditor exposes number of events that you can subscribe to. By registering event handlers, you can interact with it once the editor is loaded and running. In RichTextEditor, there are three event registration models to register event handlers:

Global Events

Global events are broadcast to all editors in the page, triggering any handlers which may be listening.

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
}
function RichTextEditor_OnCoreLoad(loader)
{
}
function RichTextEditor_OnLoad(editor)
{
    alert(editor._config.uniqueid);
}
function RichTextEditor_OnTextChanged(editor)
{
    alert(editor._config.uniqueid);
}
</script>

Using config object event Property

RichTextEditor_OnLoader automatically receives an asynchronous loader object. A loader is responsible for loading editor necessary libraries, layout information and asynchronously save data into cache. You can get _config object from the loader, so can execute custom actions to change the configuration.

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnCoreLoad=function()
    {
    }
    config.OnLoad=function(editor)
    {
    }
    config.OnTextChanged=function(editor)
    {
    }
}
</script>

Using editor.AttachEvent Method

The editor.AttachEvent( ) method requires two parameters:

editor.AttachEvent("event", functionReference);

The event parameter is the "on" version of the event name, while the function reference is just like the kind you assign to an object event handler property. The combination of AttachEvent( ) and DetachEvent( ) allows scripts to enable and disable scripted functionality as desired.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("TextChanged",function()
    {
    });
    editor.AttachEvent("ExecCommand",function()
    {
    });
}
</script>

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


Global Events

Global events are initiated by RichTextEditor whenever the event to which they refer occurs, regardless of the action that triggered the event.

The following is a list of available global application events, and in the order in which they occurs:

Event | Description
function RichTextEditor_OnLoader(loader)
{
}
 This event is invoked immediately after the loader of RichTextEditor is initialized. You can get configuration information from the loader, execute custom actions to change the configuration.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.showrulers=true;
    config.showbottombar=false;
    config.skin="office2010blue";
}
</script>

function RichTextEditor_OnCoreLoad(loader)
{
}
 This event is invoked immediately after the script library(jsml,core.js) of RichTextEditor is loaded.

Example:

<script type='text/javascript'>
function RichTextEditor_OnCoreLoad(loader)
{
}
</script>

function RichTextEditor_OnLoad(editor)
{
}
 This event is invoked immediately after the RichTextEditor is fully loaded.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(loader)
{
}
</script>

function RichTextEditor_OnTextChanged(editor)
{
}
 This event is raised if the content of RichTextEditor is changed by either a programmatic modification or user interaction.

Example:

<script type='text/javascript'>
function RichTextEditor_OnTextChanged(loader)
{
}
</script>

function RichTextEditor_OnPasteFilter(editor,info)
{
}
 This event is raised before the data is pasted into RichTextEditor. It allows you intercept the paste function and filter the content being pasted.

Example:

<script type='text/javascript'>
function RichTextEditor_OnPasteFilter(editor,info)
{
    var html=info.Arguments[0];
    var cmd=info.Arguments[1];
    info.ReturnValue="<br/>You fire "+cmd+" to paste {<hr/>"+html+"<hr/>}.";
}
</script>
RichTextEditor_OnDispose | This event occurs immediately when a RichTextEditor is removed successfully.
RichTextEditor_SelectionChanged | This event is raised if the actual selection in the editor area changes.
RichTextEditor_OnTabModeChanged | This event is raised when switching between edit, code, and preview mode.
RichTextEditor_OnUpdateUI | This event is raised when the editor updates the user interface state.
RichTextEditor_OnInitEvent | This event is raised after the iframe document of the editor is reset. You can use it to initialize the iframe document or attach events to the DOM in iframe.
RichTextEditor_OnUninitEvent | This event is raised before the iframe document of the editor is reset. You can use it to dispose all registered DOM elements before OnInitEvent occurs.
RichTextEditor_OnPreCut | This event is raised when starting to copy content in the editor. If ReturnValue=false, the action is canceled.
RichTextEditor_OnPreCopy | This event is raised when starting to cut content in the editor. If ReturnValue=false, the action is canceled.
RichTextEditor_OnExecCommand | This event is raised when ExecCommand is executed.
RichTextEditor_OnExecUICommand | This event is raised when ExecUICommand is executed.
RichTextEditor_OnFullScreenChanged | This event is raised when switching to fullscreen mode.
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Using config object event Property

RichTextEditor_OnLoader event automatically receives an asynchronous loader object. A loader is responsible for loading editor necessary libraries, layout information and asynchronously save data into cache. You can get _config object from the loader, so can execute custom actions to change the configuration.

Event | Description
OnLoad This event is invoked immediately after the RichTextEditor is fully loaded.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnLoad=function(editor)
    {
    }
}
</script>
OnDispose This event occurs immediately when a RichTextEditor is removed successfully.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnDispose=function(editor)
    {
    }
}
</script>
OnTextChanged This event is raised if the content of RichTextEditor is changed.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnTextChanged=function(editor)
    {
    }
}
</script>
SelectionChanged This event is raised if the actual selection in the editor area changes.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.SelectionChanged=function(editor)
    {
    }
}
</script>
OnTabModeChanged This event is raised when switching between edit, code, and preview mode.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnTabModeChanged=function(editor)
    {
    }
}
</script>
OnUpdateUI This event is raised when the editor updates the user interface state.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnUpdateUI=function(editor)
    {
    }
}
</script>
OnPasteFilter | This event is raised before the data is pasted into RichTextEditor. It allows you intercept the paste function and filter the content being pasted.
OnInitEvent | This event is raised after the iframe document of the editor is reset. You can use it to initialize the iframe document or attach events to the DOM in iframe.
OnUninitEvent | This event is raised before the iframe document of the editor is reset. You can use it to dispose all registered DOM elements before OnInitEvent occurs.
OnPreCut | This event is raised when starting to copy content in the editor. If ReturnValue=false, the action is canceled.
OnPreCopy | This event is raised when starting to cut content in the editor. If ReturnValue=false, the action is canceled.
OnExecCommand | This event is raised when ExecCommand is executed.
OnExecUICommand | This event is raised when ExecUICommand is executed.
OnFullScreenChanged | This event is raised when switching to fullscreen mode.
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Using editor.AttachEvent Method

The editor.AttachEvent( ) method requires two parameters:

editor.AttachEvent("event", functionReference);

The event parameter is the "on" version of the event name, while the function reference is just like the kind you assign to an object event handler property. The combination of AttachEvent( ) and DetachEvent( ) allows scripts to enable and disable scripted functionality as desired.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("TextChanged",function()
    {
    });
    editor.AttachEvent("ExecCommand",function()
    {
    });
}
</script>
Event | Description
Load This event is invoked immediately after the RichTextEditor is fully loaded.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("Load",function()
    {
    });
}
</script>
Dispose This event occurs immediately when a RichTextEditor is removed successfully.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("Dispose",function()
    {
    });
}
</script>
TextChanged This event is raised if the content of RichTextEditor is changed.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("TextChanged",function()
    {
    });
}
</script>
SelectionChanged This event is raised if the actual selection in the editor area changes.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("SelectionChanged",function()
    {
    });
}
</script>
TabModeChanged This event is raised when switching between edit, code, and preview mode.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("TabModeChanged",function()
    {
    });
}
</script>
UpdateUI This event is raised when the editor updates the user interface state.

Example:

<script type='text/javascript'>
function RichTextEditor_OnLoad(editor)
{
    editor.AttachEvent("UpdateUI",function()
    {
    });
}
</script>
PasteFilter | This event is raised before the data is pasted into RichTextEditor. It allows you intercept the paste function and filter the content being pasted.
InitEvent | This event is raised after the iframe document of the editor is reset. You can use it to initialize the iframe document or attach events to the DOM in iframe.
UninitEvent | This event is raised before the iframe document of the editor is reset. You can use it to dispose all registered DOM elements before InitEvent occurs.
PreCut | This event is raised when starting to copy content in the editor. If ReturnValue=false, the action is canceled.
PreCopy | This event is raised when starting to cut content in the editor. If ReturnValue=false, the action is canceled.
ExecCommand | This event is raised when ExecCommand is executed.
ExecUICommand | This event is raised when ExecUICommand is executed.
FullScreenChanged | This event is raised when switching to fullscreen mode.
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Accessing Iframe DOM

We don't suggest you access the DOM in editor iframe directly. Here is a sample code if you want to do it.

<script type='text/javascript'>
var globaleditor=null;
function editor_document_onmouseover(e)
{
    if(!e)e=globaleditor.GetWindow().event;
    var domnode=e.target||e.srcElement;
    var rtenode=globaleditor.GetNodeFromDom(domnode);
    if(rtenode)rtenode.SetRuntimeAttribute("style","text-decoration:underline","mybehavior");
}
function editor_document_onmouseout(e)
{
    if(!e)e=globaleditor.GetWindow().event;
    var domnode=e.target||e.srcElement;
    var rtenode=globaleditor.GetNodeFromDom(domnode);
    if(rtenode)rtenode.SetRuntimeAttribute("style",null,"mybehavior");
}
function AttachEditorEvent(editor)
{
    var win=editor.GetWindow();
    var doc=win.document;
    if(doc.addEventListener)
    {
        doc.addEventListener("mouseover",editor_document_onmouseover,false);
        doc.addEventListener("mouseout",editor_document_onmouseout,false);
    }
    else
    {
        doc.attachEvent("onmouseover",editor_document_onmouseover);
        doc.attachEvent("onmouseout",editor_document_onmouseout);
    }
}
function DetachEditorEvent(editor)
{
    var win=editor.GetWindow();
    var doc=win.document;
    if(doc.removeEventListener)
    {
        doc.removeEventListener("mouseover",editor_document_onmouseover,false);
        doc.removeEventListener("mouseout",editor_document_onmouseout,false);
    }
    else
    {
        doc.detachEvent("onmouseover",editor_document_onmouseover);
        doc.detachEvent("onmouseout",editor_document_onmouseout);
    }
}
function RichTextEditor_OnLoad(editor)
{
    globaleditor=editor;

    AttachEditorEvent(editor);

    editor.AttachEvent("InitEvent",function(argeditor,argevent)
    {
        AttachEditorEvent(editor);
    });
    editor.AttachEvent("UninitEvent",function(argeditor,argevent)
    {
        DetachEditorEvent(editor);
    });
}
</script>
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Editor Methods

RichTextEditor exposes the following methods.

Method | Description
editor.GetText() This method is used for retrieving the content of RichTextEditor as HTML.

Example:

function RichTextEditor_OnTextChanged(editor)
{
    document.getElementById("textarea1").value=editor.GetText();
}
editor.SetText() This method is used for setting the content of RichTextEditor.

Example:

function RichTextEditor_OnLoad(editor)
{
    editor.SetText("Hello World");
}
editor.InsertHTML(html) This method is used for inserting the specified HTML into a range within an editor document. If anything is selected, the selection is replaced with the new HTML and text.

Example:

var editor;
function RichTextEditor_OnLoad(rteeditor) {
    editor = rteeditor;
}
function myinserthtml
{
    if(editor)editor.InsertHTML("Hello World");
}
editor.InsertText(text,bstart) This method is used for inserting the specified plain text into a range within an editor document then move cursor to the begin/end of the added content.

Example:

var editor;
function RichTextEditor_OnLoad(rteeditor) {
    editor = rteeditor;
}
function myinserttext
{
    if(editor)
    {
        editor.InsertText("Start - Hello World",true);
        editor.InsertText("End - Hello World",false);
    }
}
editor.PasteHTML(html) | Same as editor.InsertHTML(html).
editor.AppendHTML(html) Moves the cursor to the end of the editor document, then inserts HTML.

Example:

var editor;
function RichTextEditor_OnLoad(rteeditor) {
    editor = rteeditor;
}
function myappendhtml
{
    if(editor)editor.AppendHTML("Hello World");
}
editor.InsertNode(node) | Inserts the specified node at the start of the current Range.
editor.IsTabEdit() | Returns a Boolean value that indicates whether the current mode is the Design mode.
editor.IsTabCode() | Returns a Boolean value that indicates whether the current mode is the Source mode.
editor.IsTabView() | Returns a Boolean value that indicates whether the current mode is the Preview mode.
editor.GetConfig() This method is used for retrieving the configuration of RichTextEditor. The details of configuration(RTE_Configuration) can be found configuration file file (richtexteditor\scripts\config.js).

Example:

function RichTextEditor_OnLoad(rteeditor) {
    var config = rteeditor.GetConfig();
    alert(config.skin);
}
editor.ExecUICommand(element,command,arg0) Executes a layout related command on the current selection, or the given range.

Example:

var editor;
function RichTextEditor_OnLoad(rteeditor) {
    editor = rteeditor;
}
function showrtetable
{
    if(editor)editor.ExecUICommand(this,'InsertTable','');
}
function showrtestyledropdown
{
    if(editor)editor.ExecUICommand(this,'ShowXmlFloatbox','setstyles.xml');}
}
editor.ExecCommand(command,arg0) Executes a command on the current selection, or the given range.

Example:

function RichTextEditor_OnTextChanged(rteeditor)
    rteeditor.ExecCommand("forecolor","red");
    rteeditor.ExecCommand("bold");
    rteeditor.ExecCommand("undo");
}
editor.IsCommandReady(command) Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.

Example:

function RichTextEditor_OnTextChanged(rteeditor)
    var canundo=rteeditor.IsCommandReady("undo");
}
editor.IsCommandActive(command,arg0) Returns a Boolean value that indicates the current state of the command.

Example:

function RichTextEditor_OnTextChanged(rteeditor)
    var isbold=rteeditor.IsCommandActive("bold");
}
editor.GetLangText(name,nullifnotfound) Extracts a localized string by the specified name. The language files are located in richtexteditor\lang folder. They consist of a group of name-value pairs.

Parameters:

name -- the name of a name-value pair.
nullifnotfound -- the value of a name-value pair. Return null if not found.

editor.GetWindow() Gets the active editor window.

Example:

function RichTextEditor_OnTextChanged(rteeditor)
    var editwin = rteeditor.GetWindow();
}
editor.IsDirty() Determines whether the content has changed.

Example:

function RichTextEditor_OnLoad(rteeditor)
    alert(rteeditor.IsDirty());
}
editor.IsFocused() Determines whether this element has logical focus.

Example:

function RichTextEditor_OnLoad(rteeditor)
    alert(rteeditor.IsFocused());
}
editor.Focus() Attempt to set the focus of the editor content window.

Example:

function RichTextEditor_OnLoad(rteeditor)
    rteeditor.Focus();
}
editor.GetSelectionType() Determines the selection type. This could be "Point","Range","Control" or "None".

Example:

function RichTextEditor_OnTextChanged(rteeditor)
    alert(editor.GetSelectionType());
}
editor.SaveBookmark() | Creates a bookmark on the current range.
editor.RestoreBookmark(bookmark) | Restores to a bookmark.
editor.MoveToDocumentBegin() | Moves cursor to first character of the document.
editor.MoveToDocumentEnd() | Moves cursor to the end of the document.
editor.FindNextText() | Finds the position of the next text.
editor.GetPointNode() | Gets the node object of the current selection.
editor.GetPointOffset() | Gets the point offset.
editor.GetRangeNode() | Gets the ending node of the range.
editor.GetRangeOffset() | Gets the offset of the range's ending node.
editor.SelectControl(node) | Selects the node.
editor.SelectContent(node) | Selects the content of the node.
Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.


Loader

RichTextEditor_OnLoader automatically receives an asynchronous loader object. A loader is an object that is responsible for loading editor necessary libraries, layout information and asynchronously save data into cache. You can get _config object from the loader, so can execute custom actions to change the configuration.

You can access the settings defined in the client side configuration file (richtexteditor\scripts\config.js) only after loader.oncoreload event occurs.

<script type='text/javascript'>
function RichTextEditor_OnLoader(loader)
{
    var config=loader._config;
    config.OnCoreLoad=function()
    {
    }
    config.OnLoad=function(editor)
    {
    }
    config.OnTextChanged=function(editor)
    {
    }
}
</script>

Loader exposes the following methods.

Method | Description
loader.load() | Loads the editor.
loader.startLoadTimer(milliseconds) | Loads the editor in the specified time in milliseconds.
loader.cancelLoadTimer | Cancels the loading task set by startLoadTimer.
loader.asyncloadscript(url,callback) | Loads a JavaScript file asynchronously.
loader.preloadScripts | Preloads editor JavaScript files and speed up the loading process of editor when calling loader.load() method.

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


License Agreement

This section describes our licensing policy. There maybe different licenses for each type of product.

By using or installing CuteSoft product, you are agreeing to be bound by the terms and conditions of this License Agreement. As used in this License Agreement, "You" shall mean the individual using or installing the Software together with any individual or entity, including but not limited to your employer, on whose behalf you are acting in using or installing the Software.

1. License Grant

CuteSoft grants to you only, the Licensee, the non-exclusive, nontransferable right to use the Software in accordance with the license you purchase. If you are using this product for your employer, this agreement also includes your employer. You may only use the Software on computers for which the Software is licensed. Software that is distributed as shareware or a demo may be used for testing and evaluation purposes only.

Domain License:

A domain license allows use of the Software for all users at a single site hosted on a single web server.

The license key will be generated based on your site domain name. If you will be using the components in an intranet environment, the license key will be generated based on server names.

You may also install and use the Software on an unlimited number of developer workstations (but not on a development server) for use in connection with the same single website host name when accessed by the http://localhost/Webapplication.

IP License:

An IP license allows the control to be used in all Web applications hosted on a single IP@ on a single production server.

You may also install and use the Software on an unlimited number of developer workstations (but not on a development server) for use in connection with the same single website host name when accessed by the http://localhost/Webapplication;

Small Business License:

A small business license allows use of the Software for all users at 10 sites within a single company.

The license key will be generated based on your site domain names. If you will be using the components in an intranet environment, the license key will be generated based on server names.

You may also install and use the Software on an unlimited number of developer workstations (but not on a development server) for use in connection with the same single website host name when accessed by the http://localhost/Webapplication

A big benefit of the small business license is you can add additional sites to your license file at any time if you don't have 10 sites right now.

Developer License:

A developer license entitles a single developer to install and use the product.

Developer licenses apply to software components, control or class libraries that are integrated by developers into their applications. All developer products have royalty free runtimes. This means that you may freely distribute the product with your application.

Developer Team License:

A developer team license entitles 4 developers to install and use the product.

Developer licenses apply to software components, control or class libraries that are integrated by developers into their applications. All developer products have royalty free runtimes. This means that you may freely distribute the product with your application.

Redistribution License:

A Redistribution License allows the Control to be distributed within a single commercial application. A Redistribution license entitles unlimited developer to install and use the product.

Enterprise License:

An enterprise License allows use of the Software on Unlimited servers and applications within a single organization. The Enterprise License includes Royalty FREE distribution rights.

Source Code License:

The Source code license includes the full ASP and JavaScript code of the control. It includes all of the benefits of the Enterprise license and Redistributable license and is best for companies that plan to modify the control or simply wish to have access to the code for security reasons.

2. Copyright

NOTE: This Software and the accompanying materials are copyrighted and contain proprietary information. Unauthorized copying of the Software or accompanying materials even if modified, merged, or included with other software, or of the written materials, is expressly forbidden. You may be held legally responsible for any infringement of intellectual property rights that is caused or encouraged by your failure to abide by the terms of this Agreement. You may make copies of the Software solely for backup purposes provided the copyright and trademark notices are reproduced in their entirety on the backup copy. CuteSoft reserves all rights not specifically granted to Licensee. CuteSoft warrants to you that CuteSoft is the sole owner of all patents, copyrights or other applicable intellectual property rights in and to the Software unless otherwise indicated in the documentation for Software. CuteSoft shall defend and hold Licensee harmless from any third party claims for intellectual property infringement for properly licensed Software provided by CuteSoft. The Software and documentation are licensed, not sold, to you. You may not rent, lease, display or distribute copies of the Software to others. You may not disassemble, decompose, reverse engineer, or alter the Software.

3. Warranty & Risks

Although efforts have been made to assure that the Software is date compliant, correct, reliable, and technically accurate, the Software is licensed to you as is and without warranties as to performance of merchantability, fitness for a particular purpose or use, or any other warranties whether expressed or implied. You, your organization and all users of the Software, assume all risks when using it. The manufacturers, distributors and resellers of the Software shall not be liable for any consequential, incidental, punitive or special damages arising out of the use of or inability to use the Software or the provision of or failure to provide support services, even if we have been advised of the possibility of such damages. In any case, the entire liability under any provision of this agreement shall be limited the amount actually paid by you for the.

4. Technical Support, Product Upgrades and Number of Developers

CuteSoft offers free technical support for a period of 90 days from the date of purchase on all licensed Software products. Technical support is not provided to the end user unless each end user has a valid Single User License. CuteSoft offers product free minor version upgrades. If you later upgrade the Software, this agreement will terminate, and all copies of the Software to which it applies must be destroyed.

5. Controlling Law

This License Agreement shall be governed by and construed in accordance with the laws of the Canada.

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


Deploying License File

The following guide shows how to install a RichTextEditor license file. If you haven't downloaded the software, please download it from here.

Copy phpeditor.lic to "richtexteditor" folder

You can simply copy aspeditor.lic to the web application's "richtexteditor" folder.

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


Editor Class

RichTextEditor for ASP is a powerful, professional online web based WYSIWYG HTML editor that enables ASP developers to embed a word processor, similar to Microsoft Word into a classic ASP page. This Web-based WYSIWYG Content Editing tool empowers business users with an intuitive, easy-to-use interface for creating and publishing web content. This documentation should provide everything you need to customize the Rich Tex tEditor control for your particular application.

For a list of all members of this type, see Editor Members .

Remarks

RichTextEditor for ASP supports all Internet Explorer versions from 6.0 up on Windows, Chrome, Firefox 2.0+, Netscape 7.1+, Mozilla 1.3+, Opera 9.x, Safari (2.0+) or any other browser with an equivalent gecko layout engine on any platform where these browsers are available. This includes Macintosh and Linux.

Keep in mind that you don't need a supported browser to see HTML pages generated using RichTextEditor for ASP, you just need a supported browser to edit with RichTextEditor for ASP. If you attempt to use RichTextEditor for ASP using a browser that is not supported RichTextEditor for ASP will display a regular textarea. You will still be able to edit the document, but only in HTML code view.

Example

// Register Editor component to your page
<!-- #include file="richtexteditor/include_rte.asp" -->
<html>
<body>
        <form id="form1" method="POST">
            <%
                // Create Editor instance and use Text property to load content into the RTE.
                Dim rte
                Set rte=new RichTextEditor
                rte.Text="Type here"
                // Set a unique ID to Editor
                rte.ID="Editor1"
                rte.MvcInit()
                // Render Editor
                Response.Write(rte.GetString())
            %>
        </form>
</body>
</html>

See Also

Editor Members | RTE Namespace

Copyright 2013 asp.richtexteditor.com. All rights reserved.


Editor Members

Editor overview

Public Instance Properties

AjaxPostbackUrl | Specify a URL to process editor ajax requests and upload requests.
AllowScriptCode | Specifies whether to strip all script elements and script contents from the html to prevent javaScript injection. When this property is set to false (the default) Rich Text Editor strips all script elements and script contents from the html.
AttrBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrBlackList property allows you set a list of html attributes that will be removed from content sources.
AttrWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrWhiteList property allows you set a list of html attributes that will not be removed from content sources.
AutoFocus | Specifies whether the editor grabs focus when the page loads. If this property is set to true then the editor will take focus, if it is set to false it will not.
AutoParseClasses | Specifies whether or not the RichTextEditor should automatically parse the CSS classes from ContentCss and populate all items into CssClass dropdown
BaseHref | Sets or retrieves the baseline URL on which relative links will be based.
ContentCss | Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example ContentCss="example.css,~/portal.css,/default.css"
ContentCssText | Gets or sets inline CSS text that will be used by the editable area. Example ContentCssText=" p{font:Normal 12px 'Segoe UI'} .exampleclass{font-weight: bold}"
ContextMenuMode | Determines the appearance and behavior of menus associated with the Context menu.
DesignDocType | Defines which version of HTML that RichTextEditor uses in the editor content area.
DisableClassList | The class items in the style dropdown needed to be disabled going to this string. Example DisableClassList="BreadCrumb, TopicMenu, Footer"
DisabledItems | The toolbar items needed to be disabled going to this string. Example DisabledItems="Bold, New, Delete"
EditCompleteDocument | Specifies whether a complete HTML document is being edited.
EditorBodyClass | Specifies the Class name that will be added to the body of the editor document.
EditorBodyId | Specifies an Id name that will be added to the body of the editor document.
EditorBodyStyle | Specifies the css style that will be applied to the body of the editor document.
EditorMode | Determines which mode (Edit/Code/View) the editor is in.
EnableAntiSpamEmailEncoder | Email contact links are an invaluable part of any web page. However, they are also vulnerable to a particular type of web robot known as the spam harvester or spambot. A spam harvester can read through the pages in your site and extract email addresses which are then added to bulk marketing databases. RichTextEditor allows you reduce possible spam by 'disguising' a raw email address in an encoded ASCII form.. You can turn this feature off by setting this property to "false".
EnableContextMenu | Gets or sets a value indicating whether to display the context menu, which appears when the right mouse button is clicked.
EnableDragDrop | Enables or disables drag-and-drop support for the editor.
EnableIEBorderRadius | Gets or sets a value indicating whether to render the rounded corners using border-radius in IE.
EnableMimetypeChecking | By default RichTextEditor automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). You can turn it off by setting this property to "false".
EnableObjectResizing | Specifies whether or not to allow the users resize an object winthin the RichTextEditor. For example, if you want to prevent people from resizing images, table winthin the RichTextEditor, you can set it to false.
EnterKeyTag | Specifies the behavior when the "enter" key is pressed in the editor.
FullScreen | Gets or sets whether the RichTextEditor control is used in a full-screen mode.
Height | Gets or sets the height of the RichTextEditor control.
ID | Gets or sets the programmatic identifier assigned to the server control.
Language | This property sets the user interface language localization to use.. If left empty, the editor will automatically be localized to the user language settings from the clients browser Page.Request.UserLanguages[0] ,
MaxHTMLLength | Gets or sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.
MaxTextLength | Gets or sets the maximum number of characters excluding the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.
Name | Gets or sets the name of the editor control.
PasteMode | Specifies the manner in which the editor handles pasted text.
PreviewCss | Specifies the location of the style sheet that will be used by the preview window. Multiple Style Sheets are supported. Example PreviewCss="example.css,~/portal.css,/default.css"
PreviewCssText | Gets or sets inline CSS text that will be used by the preview window. Example PreviewCssText="div,p{font:Normal 12px 'Segoe UI'}"
ReadOnly | Gets or sets a value which indicates whether the RichTextEditor should be an active HTML editor, or a read-only document viewer.
RenderSupportAjax | By default RichTextEditor automatically render html code to support AJAX. You can turn it off by setting this property to "false" for non-Ajax pages.
ResizeMode | Gets or sets the resize mode.
SaveButtonMode | Specifies the behavior when the "save" button is clicked in the editor.
SaveButtonScript | Defines the javascript function that will be executed when clicking the "save" button. If it returns false, the submit event will be cancelled. Editor1.SaveButtonScript="return mysubmitfunc()"
SecurityPolicyFile | Specifies the security policy file which contains a configurable set of rules called security policy.
ShiftEnterKeyTag | Specifies the behavior when the "enter" key is pressed while shift is held down in the editor.
ShowBottomBar | Specifies whether to display the editor bottom bar.
ShowCodeMode | Specifies whether to display the Code Mode button in the editor bottom bar.
ShowCodeToolbar | Specifies whether to display the editor code view toolbar.
ShowEditMode | Specifies whether to display the Edit Mode button in the editor bottom bar.
ShowLinkbar | When a hyperlink is selected, a link editing box will be displayed in the editor. You can turn it off by setting this property to "false".
ShowPreviewMode | Specifies whether to display the Preview Mode button in the editor bottom bar.
ShowPreviewToolbar | Specifies whether to display the editor preview mode toolbar.
ShowResizeCorner | Specifies whether to display the resize handle at the corner of the editor.
ShowRulers | Gets or sets a value indicating whether to show horizontal and/or vertical rulers.
ShowStatistics | Specifies whether to display the content statistics in the editor bottom bar.
ShowTagList | Specifies whether to display the tag selector in the editor bottom bar.
ShowToolbar | Specifies whether to display the editor toolbar.
ShowZoomView | Specifies whether to display a zoom factor drop down in the editor bottom bar.
Skin | Sets the skin for how the toolbar is draw. You can create your custom skin or choose from predefined skins.
StyleBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleBlackList property allows you set a list of style attributes that will be removed from content sources.
StyleWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleWhiteList property allows you set a list of style attributes that will not be removed from content sources.
TabSpaces | Gets or sets the number of spaces to be inserted when the user hits the "tab" key.
TagBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagBlackList property allows you set a list of html tags that will be removed from content sources.
TagWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagWhiteList property allows you set a list of html tags that will not be removed from content sources.
Text | This property provides access to the text within the editable area of the RichTextEditor control. It can be used to set the text when the control is first displayed and also to read out the text when a form has been submitted.
TextDirection | Gets or sets the text writing direction of the RichTextEditor control: left to right or right to left.
ToggleBorder | Specifies the ToggleBorder state. ToggleBorder is a handy function which allows you to see the borders without setting things to border = 1 or something like that in code. It's used for all HTML Tables, HTML Cells, Forms and Divs.
Toolbar | Auto configures the toolbar with a set of buttons. Provides a mechanism for rapidly autoconfigures the toolbar with a set of predefined buttons. For example to enable every toolbar button and menu, do this: editor1.Toolbar="full". Note that this method will affect properties of the editor, so it is usually best to call it before any other property or method.
ToolbarItems | Gets or sets the list of tool bar items.
URLType | Specifies whether the URL should be converted to a site root relative path (/html/images/image1.gif) or an absolute path (http://www.mysite.com/images/image1.gif).
UseHTMLEntities | By default Rich Text Editor maps most special characters to the equivalent HTML entity automatically. You can turn it off by setting this property to "false".
UseSimpleAmpersand | W3C recommend that all '&' in query strings be converted to &amp; This is the only way to get a piece of HTML validated. The reason is that & is the start of an HTML entity, such as &pound; If you still want to use simple Ampersand in query strings, you can set this property to true. if you want to retrieve the RichTextEditor HTML content in XHTML format, the 'UseSimpleAmpersand' property will be ignored.
Width | Gets or sets the width of the RichTextEditor control.
XHTML | Retrieves the RichTextEditor HTML content in XHTML format.

Public Instance Methods

LoadFile | Loads the contents of a file into the RichTextEditor control.
LoadHtml | Loads the contents of a HTML file into the RichTextEditor control.
MvcInit | Wires up the model, view, and controller and performs necessary initialization.

See Also

Editor Class | RTE Namespace


Editor Properties

The properties of the Editor class are listed below. For a complete list of Editor class members, see the Editor Members topic.

Public Instance Properties

AjaxPostbackUrl | Specify a URL to process editor ajax requests and upload requests.
AllowScriptCode | Specifies whether to strip all script elements and script contents from the html to prevent javaScript injection. When this property is set to false (the default) Rich Text Editor strips all script elements and script contents from the html.
AttrBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrBlackList property allows you set a list of html attributes that will be removed from content sources.
AttrWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrWhiteList property allows you set a list of html attributes that will not be removed from content sources.
AutoFocus | Specifies whether the editor grabs focus when the page loads. If this property is set to true then the editor will take focus, if it is set to false it will not.
AutoParseClasses | Specifies whether or not the RichTextEditor should automatically parse the CSS classes from ContentCss and populate all items into CssClass dropdown
BaseHref | Sets or retrieves the baseline URL on which relative links will be based.
ContentCss | Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example ContentCss="example.css,~/portal.css,/default.css"
ContentCssText | Gets or sets inline CSS text that will be used by the editable area. Example ContentCssText=" p{font:Normal 12px 'Segoe UI'} .exampleclass{font-weight: bold}"
ContextMenuMode | Determines the appearance and behavior of menus associated with the Context menu.
DesignDocType | Defines which version of HTML that RichTextEditor uses in the editor content area.
DisableClassList | The class items in the style dropdown needed to be disabled going to this string. Example DisableClassList="BreadCrumb, TopicMenu, Footer"
DisabledItems | The toolbar items needed to be disabled going to this string. Example DisabledItems="Bold, New, Delete"
EditCompleteDocument | Specifies whether a complete HTML document is being edited.
EditorBodyClass | Specifies the Class name that will be added to the body of the editor document.
EditorBodyId | Specifies an Id name that will be added to the body of the editor document.
EditorBodyStyle | Specifies the css style that will be applied to the body of the editor document.
EditorMode | Determines which mode (Edit/Code/View) the editor is in.
EnableAntiSpamEmailEncoder | Email contact links are an invaluable part of any web page. However, they are also vulnerable to a particular type of web robot known as the spam harvester or spambot. A spam harvester can read through the pages in your site and extract email addresses which are then added to bulk marketing databases. RichTextEditor allows you reduce possible spam by 'disguising' a raw email address in an encoded ASCII form.. You can turn this feature off by setting this property to "false".
EnableContextMenu | Gets or sets a value indicating whether to display the context menu, which appears when the right mouse button is clicked.
EnableDragDrop | Enables or disables drag-and-drop support for the editor.
EnableIEBorderRadius | Gets or sets a value indicating whether to render the rounded corners using border-radius in IE.
EnableMimetypeChecking | By default RichTextEditor automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). You can turn it off by setting this property to "false".
EnableObjectResizing | Specifies whether or not to allow the users resize an object winthin the RichTextEditor. For example, if you want to prevent people from resizing images, table winthin the RichTextEditor, you can set it to false.
EnterKeyTag | Specifies the behavior when the "enter" key is pressed in the editor.
FullScreen | Gets or sets whether the RichTextEditor control is used in a full-screen mode.
Height | Gets or sets the height of the RichTextEditor control.
ID (inherited from Control) | Gets or sets the programmatic identifier assigned to the server control.
Language | This property sets the user interface language localization to use.. If left empty, the editor will automatically be localized to the user language settings from the clients browser Page.Request.UserLanguages[0] ,
LoadDelay | Gets or sets the delay, in milliseconds, before the editor loading operation is started.
MaxHTMLLength | Gets or sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.
MaxTextLength | Gets or sets the maximum number of characters excluding the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.
Name | Gets or sets the name of the editor control.
PasteMode | Specifies the manner in which the editor handles pasted text.
PreviewCss | Specifies the location of the style sheet that will be used by the preview window. Multiple Style Sheets are supported. Example PreviewCss="example.css,~/portal.css,/default.css"
PreviewCssText | Gets or sets inline CSS text that will be used by the preview window. Example PreviewCssText="div,p{font:Normal 12px 'Segoe UI'}"
ReadOnly | Gets or sets a value which indicates whether the RichTextEditor should be an active HTML editor, or a read-only document viewer.
RenderSupportAjax | By default RichTextEditor automatically render html code to support AJAX. You can turn it off by setting this property to "false" for non-Ajax pages.
ResizeMode | Gets or sets the resize mode.
SaveButtonMode | Specifies the behavior when the "save" button is clicked in the editor.
SaveButtonScript | Defines the javascript function that will be executed when clicking the "save" button. If it returns false, the submit event will be cancelled. Editor1.SaveButtonScript="return mysubmitfunc()"
SecurityPolicyFile | Specifies the security policy file which contains a configurable set of rules called security policy.
ShiftEnterKeyTag | Specifies the behavior when the "enter" key is pressed while shift is held down in the editor.
ShowBottomBar | Specifies whether to display the editor bottom bar.
ShowCodeMode | Specifies whether to display the Code Mode button in the editor bottom bar.
ShowCodeToolbar | Specifies whether to display the editor code view toolbar.
ShowEditMode | Specifies whether to display the Edit Mode button in the editor bottom bar.
ShowLinkbar | When a hyperlink is selected, a link editing box will be displayed in the editor. You can turn it off by setting this property to "false".
ShowPreviewMode | Specifies whether to display the Preview Mode button in the editor bottom bar.
ShowPreviewToolbar | Specifies whether to display the editor preview mode toolbar.
ShowResizeCorner | Specifies whether to display the resize handle at the corner of the editor.
ShowRulers | Gets or sets a value indicating whether to show horizontal and/or vertical rulers.
ShowStatistics | Specifies whether to display the content statistics in the editor bottom bar.
ShowTagList | Specifies whether to display the tag selector in the editor bottom bar.
ShowToolbar | Specifies whether to display the editor toolbar.
ShowZoomView | Specifies whether to display a zoom factor drop down in the editor bottom bar.
Skin | Sets the skin for how the toolbar is draw. You can create your custom skin or choose from predefined skins.
StyleBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleBlackList property allows you set a list of style attributes that will be removed from content sources.
StyleWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleWhiteList property allows you set a list of style attributes that will not be removed from content sources.
TabSpaces | Gets or sets the number of spaces to be inserted when the user hits the "tab" key.
TagBlackList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagBlackList property allows you set a list of html tags that will be removed from content sources.
TagWhiteList | The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagWhiteList property allows you set a list of html tags that will not be removed from content sources.
Text | This property provides access to the text within the editable area of the RichTextEditor control. It can be used to set the text when the control is first displayed and also to read out the text when a form has been submitted.
TextDirection | Gets or sets the text writing direction of the RichTextEditor control: left to right or right to left.
ToggleBorder | Specifies the ToggleBorder state. ToggleBorder is a handy function which allows you to see the borders without setting things to border = 1 or something like that in code. It's used for all HTML Tables, HTML Cells, Forms and Divs.
Toolbar | Auto configures the toolbar with a set of buttons. Provides a mechanism for rapidly autoconfigures the toolbar with a set of predefined buttons. For example to enable every toolbar button and menu, do this: editor1.Toolbar="full". Note that this method will affect properties of the editor, so it is usually best to call it before any other property or method.
ToolbarItems | Gets or sets the list of tool bar items.
URLType | Specifies whether the URL should be converted to a site root relative path (/html/images/image1.gif) or an absolute path (http://www.mysite.com/images/image1.gif).
UseHTMLEntities | By default Rich Text Editor maps most special characters to the equivalent HTML entity automatically. You can turn it off by setting this property to "false".
UseSimpleAmpersand W3C recommend that all '&' in query strings be converted to &amp; This is the only way to get a piece of HTML validated. The reason is that & is the start of an HTML entity, such as &pound;

So this:

        <a href="page.aspx?var1=one&amp;var2=two">link</a>
is valid, whereas:
        <a href="page.aspx?var1=one&var2=two">link</a>
isn't.
If you still want to use simple Ampersand in query strings, you can set this property to true. if you want to retrieve the RichTextEditor HTML content in XHTML format, the 'UseSimpleAmpersand' property will be ignored.
Width | Gets or sets the width of the RichTextEditor control.
XHTML | Retrieves the RichTextEditor HTML content in XHTML format.

See Also


AjaxPostbackUrl Property

RichTextEditor for ASP 8.0 Class Library

Editor.AjaxPostbackUrl Property

Specify a URL to process editor ajax requests and upload requests.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AjaxPostbackUrl="myAjaxPostback.asp"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


AllowScriptCode Property

Editor.AllowScriptCode Property

Specifies whether to strip all script elements and script contents from the html to prevent javaScript injection. When this property is set to false (the default) Rich Text Editor strips all script elements and script contents from the html.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AllowScriptCode=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


AttrBlackList Property

Editor.AttrBlackList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrBlackList property allows you set a list of html attributes that will be removed from content sources.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AttrBlackList="id,title"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


AttrWhiteList Property

Editor.AttrWhiteList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. AttrWhiteList property allows you set a list of html attributes that will not be removed from content sources.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AttrWhiteList="title,style"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


AutoFocus Property

Editor.AutoFocus Property

Specifies whether the editor grabs focus when the page loads. If this property is set to true then the editor will take focus, if it is set to false it will not.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AutoFocus=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


AutoParseClasses Property

Editor.AutoParseClasses Property

Specifies whether or not the RichTextEditor should automatically parse the CSS classes from ContentCss and populate all items into CssClass dropdown.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.AutoParseClasses=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


BaseHref Property

Editor.BaseHref Property

Sets or retrieves the baseline URL on which relative links will be based.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.BaseHref="https://yahoo.com/"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ContentCss Property

Editor.ContentCss Property

Specifies the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported. Example ContentCss="example.css,~/portal.css,/default.css"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ContentCss="example.css,/default.css"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ContentCssText Property

Editor.ContentCssText Property

Gets or sets inline CSS text that will be used by the editable area. Example ContentCssText=" p{font:Normal 12px 'Segoe UI'} .exampleclass{font-weight: bold}"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ContentCssText="body{color:Blue;}.Head{font-weight:bold;font-size:20px;}"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ContextMenuMode Property

Editor.ContextMenuMode Property

Determines the appearance and behavior of menus associated with the Context menu.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ContextMenuMode="Simple"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


DesignDocType Property

Editor.DesignDocType Property

Defines which version of HTML that RichTextEditor uses in the editor content area.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.DesignDocType="HTML5"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


DisableClassList Property

Editor.DisableClassList Property

The class items in the style dropdown needed to be disabled going to this string. Example DisableClassList="BreadCrumb, TopicMenu, Footer"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.DisableClassList="class1, class2"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


DisabledItems Property

Editor.DisabledItems Property

The toolbar items needed to be disabled going to this string. Example DisabledItems="Bold, New, Delete"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.DisabledItems="Bold, New, Delete"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EditCompleteDocument Property

Editor.EditCompleteDocument Property

Specifies whether a complete HTML document is being edited.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EditCompleteDocument=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

Remarks

If false, the editor will only process content inside the page body i.e. all content inside of the <body>...</body> tags of a page. If true, the editor will process content outside the page body and preserve header tags (e.g. <head>...</head>, <title>...</title>, etc.).

See Also


EditorBodyClass Property

Editor.EditorBodyClass Property

Specifies the Class name that will be added to the body of the editor document.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EditorBodyClass="editorcssclass1"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EditorBodyId Property

Editor.EditorBodyId Property

Specifies an Id name that will be added to the body of the editor document.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EditorBodyId="myeditor1"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EditorBodyStyle Property

Editor.EditorBodyStyle Property

Specifies the css style that will be applied to the body of the editor document.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EditorBodyStyle="color:Red; font-style:italic;"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EditorMode Property

Editor.EditorMode Property

Determines which mode (Edit/Code/View) the editor is in.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EditorMode="Source"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableAntiSpamEmailEncoder Property

Editor.EnableAntiSpamEmailEncoder Property

Email contact links are an invaluable part of any web page. However, they are also vulnerable to a particular type of web robot known as the spam harvester or spambot. A spam harvester can read through the pages in your site and extract email addresses which are then added to bulk marketing databases. RichTextEditor allows you reduce possible spam by 'disguising' a raw email address in an encoded ASCII form.. You can turn this feature off by setting this property to "false".

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableAntiSpamEmailEncoder=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableContextMenu Property

Editor.EnableContextMenu Property

Gets or sets a value indicating whether to display the context menu, which appears when the right mouse button is clicked.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableContextMenu=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableDragDrop Property

Editor.EnableDragDrop Property

Enables or disables drag-and-drop support for the editor.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableDragDrop=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableIEBorderRadius Property

Editor.EnableIEBorderRadius Property

Gets or sets a value indicating whether to render the rounded corners using border-radius in IE.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableIEBorderRadius=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableMimetypeChecking Property

Editor.EnableMimetypeChecking Property

By default RichTextEditor automatically detect the MIME type of the files you upload, and rejects the file if the file-extension does not match the mime type ("The file is corrupt or has an incorrect extension"). You can turn it off by setting this property to "false".

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableMimetypeChecking=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnableObjectResizing Property

Editor.EnableObjectResizing Property

Specifies whether or not to allow the users resize an object winthin the RichTextEditor. For example, if you want to prevent people from resizing images, table winthin the RichTextEditor, you can set it to false.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnableObjectResizing=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


EnterKeyTag Property

Editor.EnterKeyTag Property

Specifies the behavior when the "enter" key is pressed in the editor (p, div, br).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.EnterKeyTag="br"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


FullScreen Property

Editor.FullScreen Property

Gets or sets whether the RichTextEditor control is used in a full-screen mode.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.FullScreen=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

Remarks

To enable the full-screen mode for a RichTextEditor control, set the FullScreen property to true. In this case, the control fills the entire page and can be resized together with the browser window.

See Also


Height Property

Editor.Height Property

Gets or sets the height of the RichTextEditor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.Height="320px"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Language Property

Editor.Language Property

This property sets the user interface language localization to use.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.Language="fr-FR"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


LoadDelay Property

RichTextEditor 8.0 Class Library

Editor.LoadDelay Property

Gets or sets the delay, in milliseconds, before the editor loading operation is started.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.LoadDelay=3000
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also

Editor Class | RTE Namespace

Copyright 2012 richtexteditor.com. All rights reserved.


MaxHTMLLength Property

Editor.MaxHTMLLength Property

Gets or sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.MaxHTMLLength=1000
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


MaxTextLength Property

Editor.MaxTextLength Property

Gets or sets the maximum number of characters excluding the HTML tags allowed in the RichTextEditor. Default is -1, indicating no maximum.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.MaxTextLength=500
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Name Property

Editor.Name Property

Gets or sets the name of the editor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.MvcInit()
    rte.ID="Editor1"
    rte.Name="rte1"
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


PasteMode Property

Editor.PasteMode Property

Specifies the manner in which the editor handles pasted text (Default,Disabled,Paste,PasteText,PasteWord,ConfirmWord).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.PasteMode="PasteText"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


PreviewCss Property

Editor.PreviewCss Property

Specifies the location of the style sheet that will be used by the preview window. Multiple Style Sheets are supported. Example PreviewCss="example.css,~/portal.css,/default.css"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.PreviewCss="../resources/dynamicstyle.css"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


PreviewCssText Property

Editor.PreviewCssText Property

Gets or sets inline CSS text that will be used by the preview window. Example PreviewCssText="div,p{font:Normal 12px 'Segoe UI'}"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.PreviewCss="body{color:Blue;}.Head{font-weight:bold;font-size:20px;}"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ReadOnly Property

Editor.ReadOnly Property

Gets or sets a value which indicates whether the RichTextEditor should be an active HTML editor, or a read-only document viewer.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ReadOnly=true
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


RenderSupportAjax Property

Editor.RenderSupportAjax Property

By default RichTextEditor automatically render html code to support AJAX. You can turn it off by setting this property to "false" for non-Ajax pages.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.RenderSupportAjax=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ResizeMode Property

Editor.ResizeMode Property

Gets or sets the resize mode (Default, Disabled, AutoAdjustHeight, ResizeBoth, ResizeWidth, ResizeHeight).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ResizeMode="ResizeHeight"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


SaveButtonMode Property

Editor.SaveButtonMode Property

Specifies the behavior when the "save" button is clicked in the editor (Default, None, Submit).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.SaveButtonMode="Submit"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


SaveButtonScript Property

Editor.SaveButtonScript Property

Defines the javascript function that will be executed when clicking the "save" button. If it returns false, the submit event will be cancelled. Editor1.SaveButtonScript="return mysubmitfunc()"

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.SaveButtonScript="return functionName();"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


SecurityPolicyFile Property

Editor.SecurityPolicyFile Property

Specifies the security policy file which contains a configurable set of rules called security policy.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.SecurityPolicyFile="custom.config"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShiftEnterKeyTag Property

Editor.ShiftEnterKeyTag Property

Specifies the behavior when the "enter" key is pressed while shift is held down in the editor(p, div, br).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShiftEnterKeyTag="br"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowBottomBar Property

Editor.ShowBottomBar Property

Specifies whether to display the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowBottomBar=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowCodeMode Property

Editor.ShowCodeMode Property

Specifies whether to display the Code Mode button in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowCodeMode=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowCodeToolbar Property

Editor.ShowCodeToolbar Property

Specifies whether to display the editor code view toolbar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowCodeToolbar=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowEditMode Property

Editor.ShowEditMode Property

Specifies whether to display the Edit Mode button in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowEditMode=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowLinkbar Property

Editor.ShowLinkbar Property

When a hyperlink is selected, a link editing box will be displayed in the editor. You can turn it off by setting this property to "false".

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowLinkbar=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowPreviewMode Property

Editor.ShowPreviewMode Property

Specifies whether to display the Preview Mode button in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowPreviewMode=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowPreviewToolbar Property

Editor.ShowPreviewToolbar Property

Specifies whether to display the editor preview mode toolbar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowPreviewToolbar=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowResizeCorner Property

Editor.ShowResizeCorner Property

Specifies whether to display the resize handle at the corner of the editor.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowResizeCorner=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowRulers Property

Editor.ShowRulers Property

Gets or sets a value indicating whether to show horizontal and/or vertical rulers.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowRulers=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowStatistics Property

Editor.ShowStatistics Property

Specifies whether to display the content statistics in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowStatistics=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowTagList Property

Editor.ShowTagList Property

Specifies whether to display the tag selector in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowTagList=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowToolbar Property

Editor.ShowToolbar Property

Specifies whether to display the editor toolbar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowToolbar=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ShowZoomView Property

Editor.ShowZoomView Property

Specifies whether to display a zoom factor drop down in the editor bottom bar.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ShowZoomView=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Skin Property

Editor.Skin Property

Sets the skin for how the toolbar is draw. You can create your custom skin or choose from predefined skins.

office2007blue,office2007silver,office2010blue,office2010silver,office2010black,office2003blue,office2003silver, office2003silver2,officexpblue officexpblue,officexpsilver,smartblue,smartsilver,smartgray

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.Skin="office2007blue"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


StyleBlackList Property

Editor.StyleBlackList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleBlackList property allows you set a list of style attributes that will be removed from content sources.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.StyleBlackList="color,margin"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


StyleWhiteList Property

Editor.StyleWhiteList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. StyleWhiteList property allows you set a list of style attributes that will not be removed from content sources.

Example

<%
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.StyleWhiteList="color,font-size"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


TabSpaces Property

Editor.TabSpaces Property

Gets or sets the number of spaces to be inserted when the user hits the "tab" key.

Example

<%
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.TabSpaces="&nbsp;&nbsp;"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


TagBlackList Property

Editor.TagBlackList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagBlackList property allows you set a list of html tags that will be removed from content sources.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.TagBlackList="object",embed;
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


TagWhiteList Property

Editor.TagWhiteList Property

The editor HTML Filter allows you to accept HTML input from your users, filter it to make sure it contains only an allowed set of tags, attributes and values and then display it without leaving yourself open to XSS holes. TagWhiteList property allows you set a list of html tags that will not be removed from content sources.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.TagWhiteList="form,div"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Text Property

Editor.Text Property

This property provides access to the text within the editable area of the RichTextEditor control. It can be used to set the text when the control is first displayed and also to read out the text when a form has been submitted.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


TextDirection Property

Editor.TextDirection Property

Gets or sets the text writing direction of the RichTextEditor control: left to right or right to left (LeftToRight,RightToLeft).

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.TextDirection="LeftToRight"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ToggleBorder Property

Editor.ToggleBorder Property

Specifies the ToggleBorder state. ToggleBorder is a handy function which allows you to see the borders without setting things to border = 1 or something like that in code. It's used for all HTML Tables, HTML Cells, Forms and Divs.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ToggleBorder=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Toolbar Property

Editor.Toolbar Property

Auto configures the toolbar with a set of buttons. Provides a mechanism for rapidly autoconfigures the toolbar with a set of predefined buttons. For example to enable every toolbar button and menu, do this: editor1.Toolbar="full". Note that this method will affect properties of the editor, so it is usually best to call it before any other property or method.

custom,ribbon,full,lite,forum,email,minimal

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.Toolbar="minimal"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ToolbarItems Property

Editor.ToolbarItems Property

Gets or sets the list of tool bar items.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ToolbarItems="{save,new,bold,italic,fontname,fontsize}{switchribbon}"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


URLType Property

Editor.URLType Property

Specifies whether the URL should be converted to a site root relative path (/html/images/image1.gif) or an absolute path (http://www.mysite.com/images/image1.gif).

SiteRelative, Absolute, Default

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.URLType="SiteRelative"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


UseHTMLEntities Property

Editor.UseHTMLEntities Property

By default Rich Text Editor maps most special characters to the equivalent HTML entity automatically. You can turn it off by setting this property to "false".

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.UseHTMLEntities=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


UseSimpleAmpersand Property

Editor.UseSimpleAmpersand Property

W3C recommend that all '&' in query strings be converted to &amp; This is the only way to get a piece of HTML validated. The reason is that & is the start of an HTML entity, such as &pound;

So this:

        <a href="page.aspx?var1=one&amp;var2=two">link</a>
is valid, whereas:
        <a href="page.aspx?var1=one&var2=two">link</a>
isn't.
If you still want to use simple Ampersand in query strings, you can set this property to true. if you want to retrieve the RichTextEditor HTML content in XHTML format, the 'UseSimpleAmpersand' property will be ignored.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.UseSimpleAmpersand=false
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Width Property

Editor.Width Property

Gets or sets the Width of the RichTextEditor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.Width="820px"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


XHTML Property

Editor.XHTML Property

Retrieves the RichTextEditor HTML content in XHTML format.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Editor Methods

Public Instance Methods

LoadFile | Loads the contents of a file into the RichTextEditor control.
LoadHtml | Loads the contents of a HTML file into the RichTextEditor control.
MvcInit | Wires up the model, view, and controller and performs necessary initialization.
SetSecurity | Allows you programmatically manage the security settings.

See Also


Editor.GetString Method

Loads the contents of a HTML file into the RichTextEditor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Editor.LoadFile Method

Loads the contents of a HTML file into the RichTextEditor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.LoadFile("somefile.txt")
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Editor.LoadHtml Method

Loads the contents of a HTML file into the RichTextEditor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.LoadHTML("somefile.html")
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Editor.MvcInit Method

Performs necessary initialization.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


Editor.SetSecurity Method

Allows you programmatically manage the security settings.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.SetSecurity("*", "*", "StoragePath", "~/uploads2")
    rte.MvcInit()
    rte.Name="rte1"
    rte.ID="Editor1"
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


ID Property

Editor.ID Property

Gets or sets the ID of the editor control.

Example

<%
    Dim rte
    Set rte=new RichTextEditor
    rte.Text="Type here"
    rte.ID="Editor1"
    rte.MvcInit()
    Response.Write(rte.GetString())
    // use Request.Form("Editor1")to retrieve the data
%>

See Also


RichTextEditor

Editor Class

Integrate seamlessly with your ASP application

Classes

Class Description
RTE.Editor

Thank you for choosing Rich Text Editor for ASP!

Rich Text Editor for ASP is the most powerful online web based WYSIWYG HTML editor. It enables ASP Web developers to replace the Textarea in your existing content management system with a powerful, but easy to use WYSIWYG Editor. This rich editing tool empowers end users with an intuitive, easy-to-use interface for creating and publishing web content without relying on any client-side components or controls.

Rich Text Editor for ASP toolbar is totally configurable and it is also effortless to implement. You just need a couple lines of code to add this editor to your applications.