Preparing A New Editor

in order to prepare a new editor,
some code has to be inserted it.
code to be inserted in javascript:
function getElem(name) {return document.getElementById(name)}

function gen_event(target,evt_name,flg_bubble,rnode,strings)
var evt=document.createEvent("MutationEvents")
if (!strings) { strings=[]; }
evt.initMutationEvent(evt_name,(flg_bubble)?true:false,false,rnode ,strings[0],strings[1],strings[2],evt.MODIFICATION);
return document.getElementById( getElem('control_point').getAttribute("val") )

function content_load_handler(evt)
var,editor=document.getElementById("ctl_id") )
var data=control_point.getAttribute("data")

if (/*the editor is not in wysiwyg mode*/)   /*switch the editor to wysiwyg mode*/;"text/html");
editor.contentDocument.write( data);
function on_load() {

for the on_load function,you should make sure that it will run during the window.onload event , but not interfere with the onload event of
the editor

inserted html code
you have to add an html element to the document, which has the following attributes:
id="control_point" onclick="content_load_handler(this);" style="display:none;"

For questions or comments about BBEcontainer, please send a message to the bbecontainer mailing list.
For questions or comments not about a specific project, please read our feedback page.
Copyright 2009. All rights reserved. Terms of Use.