1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>tinymce 4 editor</title>
5 </head>
6 <body>
7
8 <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
9 <script type="text/javascript" src="./js/tinymce/tinymce.min.js"></script>
10 <script type="text/javascript" src="./js/tinymce/jquery.tinymce.min.js"></script>
11 <script type="text/javascript">
12 tinymce.init({
13 selector: "textarea",
14 plugins: [
15 "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
16 "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
17 "table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
18 ],
19
20 toolbar1: "undo redo | cut copy paste | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
21 toolbar2: " searchreplace | bullist numlist | outdent indent blockquote | link unlink anchor image media code | inserttime preview | forecolor backcolor",
22 toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",
23
24 menubar: false,
25 toolbar_items_size: ‘small‘,
26
27 style_formats: [
28 {title: ‘Bold text‘, inline: ‘b‘},
29 {title: ‘Red text‘, inline: ‘span‘, styles: {color: ‘#ff0000‘}},
30 {title: ‘Red header‘, block: ‘h1‘, styles: {color: ‘#ff0000‘}},
31 {title: ‘Example 1‘, inline: ‘span‘, classes: ‘example1‘},
32 {title: ‘Example 2‘, inline: ‘span‘, classes: ‘example2‘},
33 {title: ‘Table styles‘},
34 {title: ‘Table row 1‘, selector: ‘tr‘, classes: ‘tablerow1‘}
35 ],
36
37 templates: [
38 {title: ‘Test template 1‘, content: ‘Test 1‘},
39 {title: ‘Test template 2‘, content: ‘Test 2‘}
40 ],
41 language:‘zh_CN‘
42 });</script>
43
44 <form method="post" action="somepage">
45 <textarea name="content" style="width:100%"></textarea>
46 </form>
47
48 </body>
49 </html>