This is a migrated thread and some comments may be shown as answers.

Setting RadEditor to full HTML, and retrieving the full the HTML

2 Answers 74 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 04 Feb 2013, 04:51 PM
Hi!

My Scenario:
I'm using the RadEditor control as an editor on a form that the user fills out to submit an Email.  The RadEditor is where the user types the body of the email.  We have some Email templates stored as HTML in our database that the user can select via a dropdown on the form.  The templates are full HTML having their own head tags and style tags with their own styles.

My Question:
Can I set the RadEditor content to the full HTML of my templates?  I would like to be able to set the content of the editor to the full HTML and be able to get the full HTML out of the RadEditor on the server code-behind.   I am currently trying to do this but when I use the .Content property of the editor, I'm only getting what is inside of the <body> tags, not the full HTML.   This is problematic when I need to save the editor content back to the database after the user has entered content, because I need to the full HTML to be saved to the database.  

Is my approach incorrect and instead should I be only trying to save and retrieve the body of the Editor's html, not the full html?  In that case, how would I deal with different styles that need to be applied for each my Email templates?

Please note that I've been using the  ContentAreaMode="Iframe" setting of the editor.

Thank you!!!

2 Answers, 1 is accepted

Sort by
0
Lee
Top achievements
Rank 1
answered on 05 Feb 2013, 09:23 PM
I'm mistaken.  I just realized that .Content is indeed giving me back the full HTML after setting it to the full HTML
0
Yunier
Top achievements
Rank 1
answered on 28 Feb 2013, 09:08 PM
Hi how are you. 
Please I am trying to work with the RadEditor and read your post. I hope you can help me. I want to use this component to seeting my email templates and store it in the DB. I have not idea how to do it, hope you can answer me. Thanks!!!!
Tags
Editor
Asked by
Lee
Top achievements
Rank 1
Answers by
Lee
Top achievements
Rank 1
Yunier
Top achievements
Rank 1
Share this question
or