Creating WYSIWYG (what you see is what you get) is always an interesting thing to learn for me, and hope for some of you too. Today i'll teach you about how to create it with files to download and use as demo.
WYSIWYG is a smart formatting for normal text to HTML marked up text, not everyone knows how to write in HTML but mostly people use WYSIWYG in their daily writing without knowing that they are writing HTML Codes.
//enabling iframes for html doc inside the body tag as <body onLoad="iFrameOn();">
richText.document.designMode = 'On';
//now starting the html markup functions
//and more like that, now main part
var theForm = document.getElementById("wysiwyg");
theForm.elements["textArea"].value = window.frames['richText'].document.body.innerHTML;
In HTML text the tag <form id="wysiwyg"> having id="wysiwyg" that points the document.getElementById("wysiwyg"); same as the further "textArea" is the tag <textarea id="textArea"> where we're going to put the ifamed 'richText'.
I mean, don't mess in things that much use PHP or anything be cool and contact me if you got any kind of problem.
Download Files from Box.com
Git from Github