How to get the html so its not encoded?

Posted by Dejan.S on Stack Overflow See other posts from Stack Overflow or by Dejan.S
Published on 2010-04-15T13:07:23Z Indexed on 2010/04/15 14:03 UTC
Read the original article Hit count: 243

Filed under:
|

hi. I am getting the value of a fckeditor with javascript to show in a dialog as preview. Now I want it to show the html tags like I input them but instead it shows me this

<p>&lt;div&gt;test&lt;/div&gt;</p>

that is <div>test</div>

I use this following code

function test() {
        var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
        var pageValue = oEditor.GetHTML(true);

        alert(pageValue);            
    }

I have tried to change settings like

FCKConfig.HtmlEncodeOutput = false;
FCKConfig.ProcessHTMLEntities = true;
FCKConfig.FormatSource = false;

No luck with that. I am getting a little frustrated with this problem now. Anybody got a idea why?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery