root/releases/elgg0.8rc2/_tinymce/examples/example_word.htm

Revision 848, 3.4 kB (checked in by misja, 2 years ago)

Updated TinyMCE (v2.0.9), compressor (v1.1.0), and spellchecker (v1.0.3.1)

  • Property svn:executable set to *
Line 
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <title>Word example</title>
4 <!-- TinyMCE -->
5 <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
6 <script language="javascript" type="text/javascript">
7         tinyMCE.init({
8                 mode : "textareas",
9                 theme : "advanced",
10                 plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen",
11                 theme_advanced_buttons1_add_before : "save,newdocument,separator",
12                 theme_advanced_buttons1_add : "fontselect,fontsizeselect",
13                 theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
14                 theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
15                 theme_advanced_buttons3_add_before : "tablecontrols,separator",
16                 theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
17                 theme_advanced_toolbar_location : "top",
18                 theme_advanced_toolbar_align : "left",
19                 theme_advanced_statusbar_location : "bottom",
20                 content_css : "example_word.css",
21             plugi2n_insertdate_dateFormat : "%Y-%m-%d",
22             plugi2n_insertdate_timeFormat : "%H:%M:%S",
23                 external_link_list_url : "example_link_list.js",
24                 external_image_list_url : "example_image_list.js",
25                 media_external_list_url : "example_media_list.js",
26                 file_browser_callback : "fileBrowserCallBack",
27                 paste_use_dialog : false,
28                 theme_advanced_resizing : true,
29                 theme_advanced_resize_horizontal : false,
30                 theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
31                 paste_auto_cleanup_on_paste : true,
32                 paste_convert_headers_to_strong : false,
33                 paste_strip_class_attributes : "all",
34                 paste_remove_spans : false,
35                 paste_remove_styles : false             
36         });
37
38         function fileBrowserCallBack(field_name, url, type, win) {
39                 // This is where you insert your custom filebrowser logic
40                 alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);
41
42                 // Insert new URL, this would normaly be done in a popup
43                 win.document.forms[0].elements[field_name].value = "someurl.htm";
44         }
45 </script>
46 <!-- /TinyMCE -->
47 </head>
48 <body>
49
50 <a href="example_full.htm">[Full featured example]</a> <a href="example_advanced.htm">[Advanced example]</a> <a href="example_simple.htm">[Simple example]</a> [Word example]
51
52 <form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
53         <h3>Word example</h3>
54         This example shows you how TinyMCE can be configurated to function with Word content in the best possible way. TinyMCE is configured to auto convert/cleanup pasted Word content in this example. It's has also a custom CSS that makes paragraphs marginless as in Word.<br /><br />
55         <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
56                 &lt;p&gt;Some paragraph&lt;/p&gt;
57                 &lt;p&gt;Some other paragraph&lt;/p&gt;
58                 &lt;p&gt;Some &lt;b&gt;element&lt;/b&gt;, this is to be editor 1. &lt;br /&gt; This editor instance has a 100% width to it.
59                 &lt;p&gt;Some paragraph. &lt;a href=&quot;http://www.sourceforge.net&quot;&gt;Some link&lt;/a&gt;&lt;/p&gt;
60                 &lt;img src=&quot;logo.jpg&quot;&gt;</p>
61         </textarea>
62         <br />
63         <input type="submit" name="save" value="Submit" />
64         <input type="reset" name="reset" value="Reset" />
65 </form>
66
67 </body>
68 </html>
Note: See TracBrowser for help on using the browser.