egroupware/phpgwapi/js/tinymce/examples/zh_cn/example_advanced.htm
Pim Snel 17710c20ab Add TineMCE, the future htmlArea Replacement. A clean WYSIWYG editor
see tinymce.moxiecode.com/ for more info
2005-06-21 13:02:36 +00:00

114 lines
4.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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><EFBFBD>߼<EFBFBD>ʾ<EFBFBD><EFBFBD></title></head>
<body>
<a href="example_simple.htm">[<5B><><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>]</a> [<5B>߼<EFBFBD>ʾ<EFBFBD><CABE>] <a href="example_mail.htm">[<5B>ʼ<EFBFBD>ʾ<EFBFBD><CABE>]</a> <a href="example_full.htm"><><C8AB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>]</a>
<h3><EFBFBD>߼<EFBFBD>ʾ<EFBFBD><EFBFBD></h3>
<p><EFBFBD><EFBFBD>ҳչʾ<EFBFBD><EFBFBD>TinyMCE<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>TinyMCE<EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD>趨Ϊ<EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>DIV<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>TEXTAREA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD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<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><a href="../../docs/zh_cn/index.htm"><EFBFBD>ֲ<EFBFBD></a><EFBFBD><EFBFBD><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="<22><><EFBFBD><EFBFBD>" 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>
һЩ<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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>