<script type="text/javascript" charset="utf-8">
(function() {
+
function xmleditor_onload(event, panel) {
var textareaId = 'xmleditor-' + Math.ceil(Math.random() * 1000000000);
$('textarea', panel).attr('id', textareaId);
var tag = $(this).attr('p:tag');
var handler = function() {
var text = editor.selection();
- console.log(editor, editor.frame);
editor.replaceSelection('<' + tag + '>' + text + '</' + tag + '>');
if (text.length == 0) {
var pos = editor.cursorPosition();
});
};
- function xmleditor_onunload(event, panel) {}
-
- panel(xmleditor_onload, xmleditor_onunload);
+ // define the callback
+ load_callback = xmleditor_onload;
})();
</script>