function image_sendValue()
{
	//get the preview dimensions
	image_sizes();
	
	//where was the cursor ?
	var pos=window.opener.getCaretPos();
	if(pos>-1 && oSelected==null)
	{
	  //not on an image > insert new image
		var html=window.opener.editor().innerHTML;
		var img=window.opener.document.createElement("IMG");
		
		img.src=getValue("image_src");
      	img.title=getValue("image_title");
      	img.alt=getValue("image_alt");
      	img.width=getValue("image_width");
      	img.height=getValue("image_height");
      	img.id=getValue("image_id");
      	
		window.opener.editor().innerHTML=insertAt(html,img.outerHTML,pos);
	}
	else
	{
		if(oSelected!=null)
		{
      		//an image has been dblclicked > get it by id
      		img=window.opener.document.getElementById(oSelectedId);
      		if(img!=null)
      		{
      			//set new values
      			img.src=getValue("image_src");
      			img.title=getValue("image_title");
      			img.alt=getValue("image_alt");
      			img.width=getValue("image_width");
      			img.height=getValue("image_height");
      		}
      	}
	}
	//'release' the selection
	window.opener.release();
	//handle click events on images
	window.opener.setImgEvent();
	//update txthtml value
	window.opener.getCleanHTML();
}
//send the image to the editor
send the image to the editor
send the image to the editor
function image_sendValue()
{
	image_sizes();
	var pos=window.opener.getCaretPos();
	if(pos>-1 && oSelected==null)
	{
		var html=window.opener.editor().innerHTML;
		var img=window.opener.document.createElement("IMG");
		img.src=getValue("image_src");
      	img.title=getValue("image_title");
      	img.alt=getValue("image_alt");
      	img.width=getValue("image_width");
      	img.height=getValue("image_height");
      	img.id=getValue("image_id");
		window.opener.editor().innerHTML=insertAt(html,img.outerHTML,pos);
	}
	else
	{
		if(oSelected!=null)
		{
      		img=window.opener.document.getElementById(oSelectedId);
      		if(img!=null)
      		{
      			img.src=getValue("image_src");
      			img.title=getValue("image_title");
      			img.alt=getValue("image_alt");
      			img.width=getValue("image_width");
      			img.height=getValue("image_height");
      		}
      	}
	}
	window.opener.release();
	window.opener.setImgEvent();
	window.opener.getCleanHTML();
}
function image_sendValue ( ) { image_sizes ( ) ; var pos = window . opener . getCaretPos ( ) ; if ( pos > - 1 && oSelected == null ) { var html = window . opener . editor ( ) . innerHTML ; var img = window . opener . document . createElement ( "IMG" ) ; img . src = getValue ( "image_src" ) ; img . title = getValue ( "image_title" ) ; img . alt = getValue ( "image_alt" ) ; img . width = getValue ( "image_width" ) ; img . height = getValue ( "image_height" ) ; img . id = getValue ( "image_id" ) ; window . opener . editor ( ) . innerHTML = insertAt ( html , img . outerHTML , pos ) ; } else { if ( oSelected != null ) { img = window . opener . document . getElementById ( oSelectedId ) ; if ( img != null ) { img . src = getValue ( "image_src" ) ; img . title = getValue ( "image_title" ) ; img . alt = getValue ( "image_alt" ) ; img . width = getValue ( "image_width" ) ; img . height = getValue ( "image_height" ) ; } } } window . opener . release ( ) ; window . opener . setImgEvent ( ) ; window . opener . getCleanHTML ( ) ; }
send the image to the editor
send the image to the editor
//get the preview dimensions //where was the cursor ? //not on an image > insert new image //an image has been dblclicked > get it by id //set new values //'release' the selection //handle click events on images //update txthtml value