<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../docs/style.css" rel="stylesheet" type="text/css">

<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="../../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
	tinyMCE.init({
		theme : "advanced",
		mode : "exact",
		language : "zh_cn",
		content_css : "editor_content.css",
		popups_css : "editor_popup.css",
		editor_css : "editor_ui.css",
		elements : "elm1,elm2",
		//insertlink_callback : "customInsertLink",
		//insertimage_callback : "customInsertImage",
		plugins : "table",
		theme_advanced_buttons3_add_before : "tablecontrols,separator",
		save_callback : "customSave",
		extended_valid_elements : "a[href|target|name]",
		//invalid_elements : "a",
		theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3", // Theme specific setting CSS classes
		debug : false
	});

	// Custom insert link callback, extends the link function
	function customInsertLink(href, target) {
		var result = new Array();

		alert("customInsertLink called href: " + href + " target: " + target);

		result['href'] = "http://www.sourceforge.net";
		result['target'] = '_blank';

		return result;
	}

	// Custom insert image callback, extends the image function
	function customInsertImage(src, alt, border, hspace, vspace, width, height, align) {
		var result = new Array();

		var debug = "CustomInsertImage called:\n"
		debug += "src: " + src + "\n";
		debug += "alt: " + alt + "\n";
		debug += "border: " + border + "\n";
		debug += "hspace: " + hspace + "\n";
		debug += "vspace: " + vspace + "\n";
		debug += "width: " + width + "\n";
		debug += "height: " + height + "\n";
		debug += "align: " + align + "\n";
		alert(debug);

		result['src'] = "logo.jpg";
		result['alt'] = "test description";
		result['border'] = "2";
		result['hspace'] = "5";
		result['vspace'] = "5";
		result['width'] = width;
		result['height'] = height;
		result['align'] = "right";

		return result;
	}

	// Custom save callback, gets called when the contents is to be submitted
	function customSave(id, content) {
		alert(id + "=" + content);
	}
</script>
<!-- /tinyMCE -->

<title>�߼�ʾ��</title></head>
<body>
<a href="example_simple.htm">[��ʾ��]</a> [�߼�ʾ��] <a href="example_mail.htm">[�ʼ�ʾ��]</a> <a href="example_full.htm">[ȫ����ʾ��]</a>

<h3>�߼�ʾ��</h3>
<p>��ҳչʾ��TinyMCE��Ϊ���ӵ��÷����ڴ�ҳ���ϣ�TinyMCE��ģʽ���趨Ϊ���ض������ת��Ϊ�༭����������һ��DIV�����һ��TEXTAREA����������������ʹ�����û��Զ���CSS�ļ��������Ϊ�������Ǻ�ɫ��ԭ�����⣬��ʹ����һ����&quot;advanced&quot;�����⣬����Ĭ�������и���ѡ������л��������Զ���ص�����ʾ��������������ע��ҳ��β�����ύ��ť�����ᴥ��һ��������������˽�TinyMCE��������������ã���鿴 <a href="../../docs/zh_cn/index.htm">�ֲ�</a>��<br>
  <br>

  <!-- Form with textare element with width: 100% -->
</p>
<form method="post" action="post.php">
<textarea name="elm1" style="width:100%" rows="15">
	<span class="header1">Test header 1</span><br />
	<span class="header2">Test header 2</span><br />
	<span class="header3">Test header 3</span><br />
	Some <b>element</b>, this is to be editor 1. <br /> This editor instance has a 100% width to it.
	<p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
	<img src="../logo.jpg">
</textarea>
<br>
<input type="button" name="save" value="����" onclick="tinyMCE.triggerSave();">
</form>

<!-- Div elements that gets to be a editor instance aswell -->
<div id="elm2" style="width:400px; height:250px">
	Some <b>element</b>, this is to be editor 2. <br /> This editor instance is a DIV element instead of a textarea.
	<p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
	<img src="../logo.jpg">
</div>

<br>

һЩ�Զ��������<a href="javascript:tinyMCE.execCommand('Bold');">[Bold]</a> | 
<a href="javascript:tinyMCE.execCommand('Italic');">[Italic]</a>
<a href="javascript:void(0);" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert some HTML]</a>
<a href="javascript:void(0);" onclick="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a>

<br>

</body>
</html>