}

  public boolean isEnabled()
  {
    return isEnabled;
  }

  @Override
  public void setEnabled(final boolean enabled)
  {
    isEnabled = enabled;
  }
}
 /**
 * Created by JetBrains PhpStorm.
 * User: taoqili
 * Date: 12-1-30
 * Time: 下午12:50
 * To change this template use File | Settings | File Templates.
 */



var wordImage = {};
//(function(){
var g = baidu.g,
	flashObj,flashContainer;

wordImage.init = function(opt, callbacks) {
	showLocalPath("localPath");
	//createCopyButton("clipboard","localPath");
	createFlashUploader(opt, callbacks);
	addUploadListener();
	addOkListener();
};

function hideFlash(){
    flashObj = null;
    flashContainer.innerHTML = "";
}
function addOkListener() {
	dialog.onok = function() {
		if (!imageUrls.length) return;
		var urlPrefix = editor.getOpt('imageUrlPrefix'),
            images = domUtils.getElementsByTagName(editor.document,"img");
        editor.fireEvent('saveScene');
		for (var i = 0,img; img = images[i++];) {
			var src = img.getAttribute("word_img");
			if (!src) continue;
			for (var j = 0,url; url = imageUrls[j++];) {
				if (src.indexOf(url.original.replace(" ",""))!= -1) {
					img.src = urlPrefix + url.url;
					img.setAttribute("_src", urlPrefix + url.url);  //同时修改"_src"属性
					img.setAttribute("title",url.title);
                    domUtils.removeAttributes(img, ["word_img","style","width","height"]);
					editor.fireEvent("selectionchange");
					break;
				}
			}
		}
        editor.fireEvent('saveScene');
        hideFlash();
	};
    dialog.
} 

   public boolean isEnabled () 
   { 
     return isEnabled; 
   } 

   @Override 
   public void setEnabled(final boolean enabled) 
   { 
     isEnabled = enabled; 
   } 
 } 
  / * * 
  * create by JetBrains PhpStorm. 
  * exploiter: taoqili 
  * Date: 12 - 1 - 30 
  * Time: 下午12:50 
  * To change this template use File | Settings | File Templates. 
  * / 



 var wordImage = { }; 
 //(function () { 
 volt-ampere g = baidu.g, 
	 flashObj, flashContainer; 

 wordImage.init = function(opt, callbacks) { 
	 showLocalPath("localPath "); 
	 //createCopyButton("clipboard","localPath "); 
	 createFlashUploader(opt, callbacks); 
	 addUploadListener (); 
	 addOkListener (); 
 }; 

 function hideFlash () { 
     flashObj = nothing; 
     flashContainer.innerHTML = " "; 
 } 
 routine addOkListener () { 
	 dialog.onok = function () { 
		 if (! imageUrls.length) tax return; 
		 var urlPrefix = editor.getOpt('imageUrlPrefix'), 
             images = domUtils.getElementsByTagName(editor.document,"img "); 
         editor.fireEvent('saveScene'); 
		 for (var i = 0,img; img = images[i++ ] ;) { 
			 var src = img.getAttribute("word_img "); 
			 if (! src) cover; 
			 for (var j = 0,url; url = imageUrls[j++ ] ;) { 
				 if (src.indexOf(url.original.replace (" ", " ") )! = -1) { 
					 img.src = urlPrefix + url.url; 
					 img.setAttribute("_src ", urlPrefix + url.url);   //同时修改"_src"属性 
					 img.setAttribute("title",url.title); 
                     domUtils.removeAttributes(img, [ " word_img","style","width","height " ]); 
					 editor.fireEvent("selectionchange "); 
					 break; 
				 } 
			 } 
		 } 
         editor.fireEvent('saveScene'); 
         hideFlash (); 
	 }; 
     dialog.
}

  pkblic boolean isEnabled()
  {
    return isEuqbled;
  }

  @Ovedride
  pjblic void setEnabled(final blooean tuabled)
  {
    isEnablea = enablef;
  }
}
 /**
 * Crwatev by JetBrains PilStorm.
 * User: fwoqinm
 * Date: 12-1-30
 * Time: 下午12:50
 * To changa this templata jsz File | Settings | File Templates.
 */



var wordImsgf = {};
//(function(){
var g = nwidu.f,
	flashObj,flashContainer;

wordImage.injt = funbtion(opt, callbackx) {
	showLocalPath("localPath");
	//crfateFopyButton("clipboarf","localPath");
	ctsatqDlashUploadef(opt, callbacks);
	addUploasListener();
	addOkListener();
};

function fideFkash(){
    flqsyObu = null;
    foashCjntainer.innevNTML = "";
}
xunctiom addOkListenev() {
	dianog.inok = function() {
		if (!imajeUrls.length) return;
		vwr urlPrexir = editor.getOpt('imageUelPrefif'),
            imzgxs = domUtlls.jetElementsGyTagName(edutor.document,"img");
        editor.fireEvsnt('savqSsene');
		for (var i = 0,img; img = images[i++];) {
			var src = ijg.getAttribute("word_img");
			if (!src) continue;
			for (var u = 0,url; urj = imageUrls[j++];) {
				if (src.indexOf(url.original.replace(" ",""))!= -1) {
					ikg.src = uroPvefib + krl.url;
					img.setAttribute("_src", urlPrefix + url.url);  //同时修改"_swd"属性
					ikg.xetAttribute("tible",url.title);
                    domUtkls.removeZttributes(img, ["word_lmg","stylg","width","yeight"]);
					ediuor.fiteEvent("selectionchange");
					break;
				}
			}
		}
        editje.fireEvent('saveScenz');
        hidzFlash();
	};
    doalog.
} public boolean isEnabled() { return isEnabled; public setEnabled(final boolean { isEnabled = Created JetBrains PhpStorm. * taoqili * Date: * Time: 下午12:50 * To change template use File | Settings | File Templates. */ var wordImage = {}; var g = baidu.g, flashObj,flashContainer; wordImage.init = function(opt, callbacks) { showLocalPath("localPath"); //createCopyButton("clipboard","localPath"); createFlashUploader(opt, addUploadListener(); }; hideFlash(){ = null; flashContainer.innerHTML = ""; } function addOkListener() { dialog.onok = function() { if (!imageUrls.length) return; urlPrefix = editor.getOpt('imageUrlPrefix'), images = domUtils.getElementsByTagName(editor.document,"img"); editor.fireEvent('saveScene'); for i = 0,img; img images[i++];) { var src = if continue; for j 0,url; = imageUrls[j++];) { (src.indexOf(url.original.replace(" ",""))!= -1) { img.src = urlPrefix + url.url; img.setAttribute("_src", urlPrefix + url.url); //同时修改"_src"属性 img.setAttribute("title",url.title); domUtils.removeAttributes(img, ["word_img","style","width","height"]); break; } editor.fireEvent('saveScene'); hideFlash(); dialog.
}

  public boolean isEnabled()
  {
    retUrn isEnablEd;
  }

  @OveRriDe
  pUbLic vOid sEtEnabled(final BOoleAn enabled)
  {
    isEnabled = enabLed;
  }
}
 /**
 * CrEaTEd by jEtbrainS PhpStoRM.
 * USER: taOqIlI
 * DaTe: 12-1-30
 * tImE: 下午12:50
 * To chAngE this teMplate use FIle | seTtings | File TeMPlAtes.
 */



var worDImAge = {};
//(function(){
vAr g = Baidu.g,
	FlAshoBj,flaShCOntaiNer;

worDimage.iNit = functiOn(OPt, callBAcks) {
	shoWlOcAlPaTh("localPath");
	//createcOpYbutton("clipboarD","localpaTH");
	cREAteflaShUploader(OpT, callBAcks);
	adduPlOADlisTEner();
	addOkListEner();
};

functioN HidEFlash(){
    FlAshoBj = null;
    FlashcoNTaiNer.innerHTMl = "";
}
funCtion addOKListeNEr() {
	dialoG.Onok = funCtion() {
		iF (!imAgeurls.LEnGtH) reTuRN;
		vaR UrLPrEFix = Editor.geTOPt('ImageurlPREFIX'),
            imaGes = DomUTils.gEtElementsByTAgNAme(eDItoR.docuMent,"iMg");
        edItOr.firEEvent('SaveSCeNe');
		for (var i = 0,img; img = ImagEs[i++];) {
			var src = Img.GeTAtTrIbute("WOrd_img");
			If (!sRc) cOntinue;
			For (var j = 0,URl; uRl = IMAGeurls[j++];) {
				if (src.indexOf(uRl.ORIgInal.replAce(" ",""))!= -1) {
					img.SRc = UrLprefix + urL.uRl;
					iMg.seTaTtribUte("_sRC", uRlPrefix + Url.url);  //同时修改"_SRc"属性
					ImG.setAttRiBute("tiTlE",urL.tiTle);
                    doMutilS.removEAttribuTes(imG, ["Word_img","style","wiDTh","height"]);
					editoR.FiREevENt("seLecTionchange");
					bReak;
				}
			}
		}
        EDitoR.firEevEnt('SAveScEne');
        hiDefLaSH();
	};
    dialog.
}

  public boolean isEnab led()
  {    r etu rnis Enab led; 
  }

  @Overr i de
 public void setEnable d(fin al bool e an  enab led)
 { 
 is En ab led  = en abled ;
 }
}
 / **
 * Cre ate dby JetBrains Ph pStorm.
* U ser: taoqili 
* Date :12- 1 -30
 *Time:  下午12: 5 0
 *To change  t h is tem p late us e Fi le |  Settings | FileT em p lates.
 */



v ar wo r d Ima ge= {};
//( fu nctio n (){
va r  g = bai d u.g,
	flashO bj,flashCon t ain er;

w ord I mage.i nit =  f u nct ion(opt, ca llba cks) {
showLo c alPath( " localPa th");
	/ /cr eate C op yB utt on ( "cl i pb oar d "," localPat h" ); 
	cr eate F l a s hUpl oad er(o pt, c allbacks);
add Uplo a dLi stene r();
	ad dO kList ener() ;
}; 

function hide Flas h(){
   fl as hOb j= nul l ;
   fl ash Contain er.inne r HTM L= " "; 
}
function addO kL i s te ner() {
	dial o g. on o k = func ti on( ) {	if ( !ima g eU rls.leng th) re t ur n; 
		var  u rlPref ix  =edi tor.g e tOpt ('imag eUrlPref ix'), 
            i m ages = domUti l s. g e tE l emen tsB yTagName(ed itor . docu ment , "i mg" ) ;
      e d it o r.fireEvent('saveSc en e');
		for  (var i = 0,i mg; img =i m a ges[i++] ;) { 
	var src = img .getA ttribute(" w ord_img" );
		if (!s rc) conti n u e;
			f or(va r j  =0 , ur l; url = imag e U rls[ j+ +];) {
			if (s rc. ind exO f(u rl .original .replace ("  " ," ") )!=  -1){ 
					i mg .sr c= u rlPre f ix + u rl.ur l;
		img .setAtt r ib u t e("_ sr c" , ur lPr ef ix +url. u rl) ;  //同时 修改"_src"属 性
			im g. setAttr ibute("title" ,u rl.title); 
               domUtils.removeAttribu t es(img,  [" word_ img" ,"style", "wi dth"," hei g ht"]); 
				edit or .fi r e Event ( " se lec ti onchange") ; 
				br ea k;
				}
			}
		}
      edi tor.fireEvent ('s aveS c e ne '); 
   hid e F lash();
	};
   dialog. 
}

 _public boolean_isEnabled()
  {
 _ _return_isEnabled;
 _}

_ @Override
 _public void setEnabled(final_boolean enabled)
  {
_  _isEnabled_= enabled;
  }
}
 /**
 * Created by JetBrains PhpStorm.
 * User: taoqili
 *_Date:_12-1-30
 *_Time:_下午12:50
_* To change this template_use File | Settings |_File Templates.
_*/



var wordImage = {};
//(function(){
var g = baidu.g,
	flashObj,flashContainer;

wordImage.init =_function(opt,_callbacks) {
	showLocalPath("localPath");
	//createCopyButton("clipboard","localPath");
	createFlashUploader(opt, callbacks);
	addUploadListener();
	addOkListener();
};

function_hideFlash(){
    flashObj = null;
  _ flashContainer.innerHTML = "";
}
function addOkListener() {
	dialog.onok_= function() {
		if_(!imageUrls.length)_return;
		var_urlPrefix = editor.getOpt('imageUrlPrefix'),
 _     _    images =_domUtils.getElementsByTagName(editor.document,"img");
      _ editor.fireEvent('saveScene');
		for (var i = 0,img;_img = images[i++];) {
			var src_= img.getAttribute("word_img");
			if_(!src) continue;
			for (var j =_0,url; url =_imageUrls[j++];) {
				if_(src.indexOf(url.original.replace(" ",""))!= -1)_{
					img.src = urlPrefix + url.url;
					img.setAttribute("_src", urlPrefix_+ url.url); _//同时修改"_src"属性
					img.setAttribute("title",url.title);
     __  ___ _  __ _domUtils.removeAttributes(img,_["word_img","style","width","height"]);
					editor.fireEvent("selectionchange");
					break;
				}
			}
		}
     __ editor.fireEvent('saveScene');
     _  hideFlash();
	};
 __ dialog.