Editor Members

Rich Text Editor for PHP

RichTextEditor for PHP 8.0 Class Library

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 & 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 £

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