MINI MINI MANI MO

Path : /home/lhcar/www/board/
File Upload :
Current File : /home/lhcar/www/board/SmartEditor2.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<title>³×À̹ö :: Smart Editor 2 &#8482;</title>
<script type="text/javascript" src="./js/HuskyEZCreator.js" charset="euc-kr"></script>
</head>
<body>
<form action="sample.php" method="post">
	<textarea name="ir1" id="ir1" rows="10" cols="100" style="width:766px; height:412px; display:none;"></textarea>
	<!--textarea name="ir1" id="ir1" rows="10" cols="100" style="width:100%; height:412px; min-width:610px; display:none;"></textarea-->
	<p>
		<input type="button" onclick="pasteHTML();" value="º»¹®¿¡ ³»¿ë ³Ö±â" />
		<input type="button" onclick="showHTML();" value="º»¹® ³»¿ë °¡Á®¿À±â" />
		<input type="button" onclick="submitContents(this);" value="¼­¹ö·Î ³»¿ë Àü¼Û" />
		<input type="button" onclick="setDefaultFont();" value="±âº» ÆùÆ® ÁöÁ¤Çϱâ (±Ã¼­_24)" />
	</p>
</form>

<script type="text/javascript">
var oEditors = [];
nhn.husky.EZCreator.createInIFrame({
	oAppRef: oEditors,
	elPlaceHolder: "ir1",
	sSkinURI: "SmartEditor2Skin.html",	
	htParams : {bUseToolbar : true,
		fOnBeforeUnload : function(){
			//alert("¾Æ½Î!");	
		}
	}, //boolean
	fOnAppLoad : function(){
		//¿¹Á¦ ÄÚµå
		//oEditors.getById["ir1"].exec("PASTE_HTML", ["·ÎµùÀÌ ¿Ï·áµÈ ÈÄ¿¡ º»¹®¿¡ »ðÀԵǴ textÀÔ´Ï´Ù."]);
	},
	fCreator: "createSEditor2"
});

function pasteHTML() {
	var sHTML = "<span style='color:#FF0000;'>À̹ÌÁöµµ °°Àº ¹æ½ÄÀ¸·Î »ðÀÔÇÕ´Ï´Ù.<\/span>";
	oEditors.getById["ir1"].exec("PASTE_HTML", [sHTML]);
}

function showHTML() {
	var sHTML = oEditors.getById["ir1"].getIR();
	alert(sHTML);
}
	
function submitContents(elClickedObj) {
	oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);	// ¿¡µðÅÍÀÇ ³»¿ëÀÌ textarea¿¡ Àû¿ëµË´Ï´Ù.
	
	// ¿¡µðÅÍÀÇ ³»¿ë¿¡ ´ëÇÑ °ª °ËÁõÀº À̰÷¿¡¼­ document.getElementById("ir1").value¸¦ ÀÌ¿ëÇØ¼­ ó¸®ÇÏ¸é µË´Ï´Ù.
	
	try {
		elClickedObj.form.submit();
	} catch(e) {}
}

function setDefaultFont() {
	var sDefaultFont = '±Ã¼­';
	var nFontSize = 24;
	oEditors.getById["ir1"].setDefaultFont(sDefaultFont, nFontSize);
}
</script>

</body>
</html>

OHA YOOOO