Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 22, 2012 02:13 PM by BoogleC
Feb 22, 2012 01:27 PM|LINK
I have installed the CLEditor package which adds a WYSIWYG editor on my page. However when saving, I basically just get something like:
<span style="font-weight: normal; "><font face="Arial, Verdana" style="font-size: 10pt; ">testing t</font><font face="'Arial Black'" size="6">his out</font><font face="Arial, Verdana" style="font-size: 10pt; "> out </font></span><b style="font-size: 10pt; font-family: Arial, Verdana; ">wooohoooo </b>
If I change the output to Html.Raw then it applies the style to the entire page. What is the correct method for outputting html with the razor view engine?
Feb 22, 2012 02:13 PM|LINK
If I'm understanding correctly - first you enter some text into a WYSIWYG and are saving it. Then you are pulling what you saved back out and it comes with all that styling?
The problem is not how you output HTML using razorengine because Html.Raw is the best method for that. The problem is saving all styling information. You need to disable styling within the WYSIWYG, so that it saves just basic tags, i.e. <p>xxxx</p><h3>dfgfdgfd</h3>
etc. And no <span style...>