Hi, I am new here. Well, I made a rich text editor using IFrame and document.execcomand. All is ok, except I want to add something like displaying the HTML code of the text written in the IFrame to a div or a textarea.
For example, if someone has typed "Hello", and select it and click Bold, it will become bold. But the IFrame does not show: <strong>Hello</strong>, thus, I want to display the HTML as well in a textarea. How to do this?
var frame = document.getElementById("myIFrame"); // iFrame with the HTML
var div = document.getElementById("myDiv"); // div to show the HTML
div.innerText = frame.document.body.innerHTML; // Sets the Text of the div as the HTML of the frame.
the thread has been marked as solved..The editor will be exposed on the day I completed my website. Because Im doing more open source project. I want to make the web more free... the web should be open source... many people do not have the opportunity to take course, so, i decided to contribute. im myself a student but i work with the web since 3 years. if you can add me here, or leave me an email, it will be ok, so that i can let you know about the day the editor is revealed.