Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do you get the HTML entered in the DNN TextEditor control?How do you get the HTML entered in the DNN TextEditor control?
Previous
 
Next
New Post
5/26/2006 10:05 AM
 

Ok, I know this has to be simple, but I'm just not finding what I need. I added a DNN TextEditor control to my module. It works great, but now I want to get the HTML that the control produces. From looking at other source files it seems as though I would just look at the .Text property. But that does not contain what I typed into the control. What am I doing wrong? How do you get what the user entered into the control?

Thanks

 
New Post
5/30/2006 12:24 PM
 
Anyone? anyone?
 
New Post
5/30/2006 1:35 PM
 

Right out of DNN LiIbrary Controls/TextEditor.vb - Basic values are text/html/raw or rich text...

'Gets/Sets the Text of the control

Public Property Text() As String

Get

If optView.SelectedItem.Value = "BASIC" Then

Select Case optRender.SelectedItem.Value

Case "T"

Text = Encode(FormatHtml(txtDesktopHTML.Text))

Case "R"

Text = txtDesktopHTML.Text

Case Else

Text = Encode(txtDesktopHTML.Text)

End Select

Else

Text = Encode(RichTextEditor.Text)

End If

End Get

I hope this is of some help to you.


Dwayne J. Baldwin
 
New Post
5/30/2006 5:34 PM
 

Thanks, but I'm still having a problem.

If I have the basic editor selected, then the .Text property does contain the correct text, but as soon as I change to Rich Text editor the .Text property of the DNN TextEditor control is cleared out/blank. What am I doing wrong?

Here is the code on my ASCX:

<dnn:texteditor id="txtHTML" runat="server" width="100%" height="300"></dnn:texteditor>

Now here is the code I am using in my Page_Load just to see what is stored in the txtHTML control.

lblDebug.Text = txtHTML.Text

No matter what I do, I can't get anything to display when I have the control in RichText mode.

????

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How do you get the HTML entered in the DNN TextEditor control?How do you get the HTML entered in the DNN TextEditor control?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out