<!--
// GPL
-->
<html>
<head>
<style>
body,html {
overflow-y: hidden;
overflow: hidden;
border: 0px;
margin: 0px;
padding: 0px;
}
</style>
<script language="javascript" type="text/javascript" src="./tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
function getContent() {
var data = top.getObj("value").value;
if (data.indexOf("html:")==0) {
data = data.substring(5)
} else { // convert text to html
data = data.replace(/</g,"<").replace(/>/g,">");
data = data.replace(/\\n/g,"<br>");
}
return data;
}
function refresh(inst) {
top.previewMultiline("html:"+inst.getBody().innerHTML);
}
function update() {
document.getElementById("elem").value = getContent();
tinyMCE.updateContent("elem");
}
</script>
</head>
<body>
<form id="elem_form">
<textarea id="elem" name="elem" style="width:100%; height:100%;" rows="10" onchange="alert('test');"></textarea>
</form>
<script>
document.getElementById("elem").value = getContent();
loadTiny("elem");
function loadTiny(elem) {
tinyMCE.init({
language: "en",
mode: "exact",
elements: elem,
theme: "advanced",
plugins: "save,close,paste,iespell",
theme_advanced_buttons1: "cut,copy,paste,separator,pastetext,pasteword,cleanup,removeformat,separator,undo,redo,separator,link,unlink,separator,forecolor,backcolor,separator,charmap,hr",
theme_advanced_buttons2: "bold,italic,underline,fontsizeselect,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,outdent,indent,separator,sub,sup",
theme_advanced_buttons3: "",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
extended_valid_elements: "a[name|href|target|title],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
force_p_newlines: false,
auto_focus: false, // "mce_editor_0"
onchange_callback: "refresh",
gecko_spellcheck : true
});
}
</script>
</body>
</html>