Хотел заменить глючный плагин rj_insertcode TinyMCE (Version: 3.4.4) на эдитор EditArea
В попуп-окно эдитор вставил, а как вывести содержание в TINY не получается
<script language="javascript" type="text/javascript">
function init() {
var inst = tinyMCE.selectedInstance;
var elm = inst.getFocusElement();
alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));
document.forms[0].codeContent.value = elm.nodeName;
}
function insertSomething() {
tinyMCEPopup.execCommand('codeContent');
tinyMCEPopup.close();
}
</script>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<script language="javascript" type="text/javascript" src="edit_area/edit_area_full.js"></script>
<script language="Javascript" type="text/javascript">
editAreaLoader.init({
language:"ru"
,id: "popuptextarea" // id of the textarea to transform
,start_highlight: true // if start with highlight
,allow_toggle: true
,syntax_selection_allow: "html,php,js,css"
,syntax: "html"
,allow_resize: "both"
,toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight"
,show_line_colors: true
});
</script>
</tbody>
</table>
<form onsubmit="insert();return false;">
<textarea name="codeContent" id="popuptextarea" cols="100" rows="15"
style="width: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;"
dir="ltr" wrap="off"> </textarea>
<div class="mceActionPanel">
<input type="submit" id="insert" name="insert" value="{#insert}" onclick="insertSomething();" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>