| 1 |
// Display/Hide WYMeditor
|
| 2 |
function wymToggleDisplay()
|
| 3 |
{
|
| 4 |
txt = document.getElementById("edit-body");
|
| 5 |
txt.style.display = (txt.style.display == "") ? "none" : "";
|
| 6 |
wymdiv = document.getElementById("wym-div");
|
| 7 |
wymdiv.style.display = (wymdiv.style.display == "") ? "none" : "";
|
| 8 |
|
| 9 |
// Populate either the editor or the textarea, according to what is to be shown.
|
| 10 |
if(wymdiv.style.display == ""){
|
| 11 |
// When hiding the iframe, Gecko forgets the 'styleWithCSS' setting.
|
| 12 |
if (moz) setTimeout("execCom('styleWithCSS',false,false);",500);
|
| 13 |
setHTML();
|
| 14 |
} else
|
| 15 |
getCleanHTML();
|
| 16 |
|
| 17 |
}
|