Login Register

Viewing the HTML source code inside Editor.

Is there anyway you can view the html source code inside the Editor? Kind of like yahoo 360. I need to create a function that would let me view the html source code inside the Editor. Yahoo 360 does this using a check box. Checking it lets you view your blog in html source code and unchecking lets you view it in normal html.

There is a property called

There is a property called "savedContent" which should show you the raw HTML. I was able to create an Editor widget using the following markup (and version 1.1.0 of Dojo):

<div style="border: 1px dotted black; background: white;">
      <textarea dojoType="dijit.Editor"
         id="editor"
         height="110px">

                This is the content area for the editor.<br>
                Here is a line of text.<br>
                Here is another line of text.
      </textarea>
</div>

I was then able to see the raw HTML using the following JavaScript

var element = dijit.byId('editor');
console.log(element.savedContent);