DNN Module Development Series (6) Generic controls in--dnn (bottom)

Source: Internet
Author: User
Tags dnn

TextEditor:

Brief introduction:

Rich Text editor control. The function is needless to say, we all often use. DNN uses providers mode to easily integrate a variety of rich text editors. As far as I know, there are: Freetextbox,fckeditor,webhtmleditor,cuteeditor. You can configure Web.config can easily choose to use one, the specific configuration method in each rich text editor providers should have a detailed description.

Location: Controls\texteditor.ascx

Property:

Choosemode: Enable/disable user Switching between General text editor and Rich text Editor, default to enable

Chooserender: Whether to enable text content rendering in general text editor mode is enabled by default

DefaultMode: Default editor mode, default to Rich Text mode ("Rich" or "BASIC")

HtmlEncode: Whether to HTML-encode content (that is, to escape some characters, such as: "<", ">" and so on)

Mode: The current editor pattern, Rich Text or general mode ("Rich" or "BASIC")

Text: The textual content of the control

Height: Control height

Width: Control widths

Textrendermode: Setting text rendering in general text editor mode {RAW | HTML | Text}

Raw: The Natural Way, the original text is what kind of display.

HTML: Convert text formatting to HTML (that is, replace all carriage returns with "" and replace the newline character with "<br/>")

Text: Converts HTML formatting to textual format (first replaces all whitespace Furu tabs, and then replaces all <br> labels with line breaks)

RichText: Rich Text editor Provider

How to use:

1, first in the need to apply the page to register this control, such as:

<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>

2, in need to use the location to write down the following code, such as:

<dnn:texteditor id="teContent" runat="server" height="400" width="500"></dnn:texteditor>

3, in the background code to declare the control and use this control

Protected WithEvents teContent As TextEditor
teContent.Text = objArticle.Content
objArticle.Content = teContent.Text

Note: If you want to display rich text content, you need to decode it with Server.htmldecode ().

Related Rich Text editors available:

"Let DNN also use Cuteeditor"

Another handy Rich Text editor (FCKEditor) in DNN

"Lionhtmleditorprovider (v1.0.3)"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.