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

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedUsing TextEditor in Custom ModuleUsing TextEditor in Custom Module
Previous
 
Next
New Post
1/11/2012 3:22 PM
 

I'm having problems with using the data saved from the dnn TextEditor.  I'm working on a module and I have a screen where I use the dnn TextEditor to enter content that I want to use on another part of the module. When entering content using the TextEditor I have inserted an image and it shows perfectly in the TextEditor when I add it and when I return to edit it.  However, when I try to pull that content out of the database and display it on the screen outside of the TextEditor I keep getting the html markup instead of the image.  It displays the following on the screen - <img alt="" src="marketplace_icon.gif"> - rather than showing me the image itself.  I have defined a label in the ascx part of the module called lblMsg and I load lblMsg.Text with the content I pull from the database.  Should I be using a different property of lblMsg to avoid it converting the opening and closing tags from '<' and '>' to < and >? I'm really not sure whether the problem  is the way I'm saving the data (the DBISAM database I'm interfacing with won't allow me to actually see what was saved), or whether it's the way I'm loading the data into lblMsg.Text.

 I figure I've probably missed something very simple.  I would really appreciate being shown the error of my ways and being pointed in the right direction.

 The module I'm working on is developed using DNN 5.

 
New Post
1/11/2012 3:44 PM
 

TextEditor saves data in encoded state, you have to use HTML decode to show contents properly:

<asp:Label ID="TextContentLabel" runat="server" Text='<%# HttpUtility.HTMLDecode(Eval("TextContent")) %>' />

 
New Post
1/11/2012 3:52 PM
 
I figured out what the problem was.  It had nothing to do with the TextEditor but rather the contortions I went thru saving the data to the DBISAM database.  I had replaced quotes with &#34; prior to saving the data since the method for writing to the DBISAM database would have had problems with the quotes.  Once I added code to change this value back to quotes when I read it back in the whole thing worked properly.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedUsing TextEditor in Custom ModuleUsing TextEditor in Custom Module


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