comparison static/js/tinymce/examples/skins.html @ 45:966cde8635c0

For issue #3, created a separate news app. Created import management command. Using TinyMCE editor in the admin. News model now stores HTML. The news page is now paginated. Each story has a perma-link now.
author Brian Neal <bgneal@gmail.com>
date Thu, 15 Mar 2012 20:02:39 -0500
parents
children
comparison
equal deleted inserted replaced
44:42a6bde9913c 45:966cde8635c0
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>Skin support example</title>
5
6 <!-- TinyMCE -->
7 <script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
8 <script type="text/javascript">
9 // Default skin
10 tinyMCE.init({
11 // General options
12 mode : "exact",
13 elements : "elm1",
14 theme : "advanced",
15 plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
16
17 // Theme options
18 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
19 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
20 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
21 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
22 theme_advanced_toolbar_location : "top",
23 theme_advanced_toolbar_align : "left",
24 theme_advanced_statusbar_location : "bottom",
25 theme_advanced_resizing : true,
26
27 // Example content CSS (should be your site CSS)
28 content_css : "css/content.css",
29
30 // Drop lists for link/image/media/template dialogs
31 template_external_list_url : "lists/template_list.js",
32 external_link_list_url : "lists/link_list.js",
33 external_image_list_url : "lists/image_list.js",
34 media_external_list_url : "lists/media_list.js",
35
36 // Replace values for the template plugin
37 template_replace_values : {
38 username : "Some User",
39 staffid : "991234"
40 }
41 });
42
43 // O2k7 skin
44 tinyMCE.init({
45 // General options
46 mode : "exact",
47 elements : "elm2",
48 theme : "advanced",
49 skin : "o2k7",
50 plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
51
52 // Theme options
53 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
54 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
55 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
56 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
57 theme_advanced_toolbar_location : "top",
58 theme_advanced_toolbar_align : "left",
59 theme_advanced_statusbar_location : "bottom",
60 theme_advanced_resizing : true,
61
62 // Example content CSS (should be your site CSS)
63 content_css : "css/content.css",
64
65 // Drop lists for link/image/media/template dialogs
66 template_external_list_url : "lists/template_list.js",
67 external_link_list_url : "lists/link_list.js",
68 external_image_list_url : "lists/image_list.js",
69 media_external_list_url : "lists/media_list.js",
70
71 // Replace values for the template plugin
72 template_replace_values : {
73 username : "Some User",
74 staffid : "991234"
75 }
76 });
77
78 // O2k7 skin (silver)
79 tinyMCE.init({
80 // General options
81 mode : "exact",
82 elements : "elm3",
83 theme : "advanced",
84 skin : "o2k7",
85 skin_variant : "silver",
86 plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
87
88 // Theme options
89 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
90 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
91 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
92 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
93 theme_advanced_toolbar_location : "top",
94 theme_advanced_toolbar_align : "left",
95 theme_advanced_statusbar_location : "bottom",
96 theme_advanced_resizing : true,
97
98 // Example content CSS (should be your site CSS)
99 content_css : "css/content.css",
100
101 // Drop lists for link/image/media/template dialogs
102 template_external_list_url : "lists/template_list.js",
103 external_link_list_url : "lists/link_list.js",
104 external_image_list_url : "lists/image_list.js",
105 media_external_list_url : "lists/media_list.js",
106
107 // Replace values for the template plugin
108 template_replace_values : {
109 username : "Some User",
110 staffid : "991234"
111 }
112 });
113
114 // O2k7 skin (silver)
115 tinyMCE.init({
116 // General options
117 mode : "exact",
118 elements : "elm4",
119 theme : "advanced",
120 skin : "o2k7",
121 skin_variant : "black",
122 plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
123
124 // Theme options
125 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
126 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
127 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
128 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
129 theme_advanced_toolbar_location : "top",
130 theme_advanced_toolbar_align : "left",
131 theme_advanced_statusbar_location : "bottom",
132 theme_advanced_resizing : true,
133
134 // Example content CSS (should be your site CSS)
135 content_css : "css/content.css",
136
137 // Drop lists for link/image/media/template dialogs
138 template_external_list_url : "lists/template_list.js",
139 external_link_list_url : "lists/link_list.js",
140 external_image_list_url : "lists/image_list.js",
141 media_external_list_url : "lists/media_list.js",
142
143 // Replace values for the template plugin
144 template_replace_values : {
145 username : "Some User",
146 staffid : "991234"
147 }
148 });
149 </script>
150 <!-- /TinyMCE -->
151
152 </head>
153 <body>
154
155 <form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
156 <h3>Skin support example</h3>
157
158 <p>
159 This page displays the two skins that TinyMCE comes with. You can make your own by creating a CSS file in themes/advanced/skins/<yout skin>/ui.css
160 There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
161 </p>
162
163 <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
164 <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
165 &lt;p&gt;
166 This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
167 &lt;/p&gt;
168 &lt;p&gt;
169 Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
170 &lt;/p&gt;
171 </textarea>
172
173 <br />
174
175 <textarea id="elm2" name="elm2" rows="15" cols="80" style="width: 80%">
176 &lt;p&gt;
177 This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
178 &lt;/p&gt;
179 &lt;p&gt;
180 Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
181 &lt;/p&gt;
182 </textarea>
183
184 <br />
185
186 <textarea id="elm3" name="elm3" rows="15" cols="80" style="width: 80%">
187 &lt;p&gt;
188 This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
189 &lt;/p&gt;
190 &lt;p&gt;
191 Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
192 &lt;/p&gt;
193 </textarea>
194
195 <br />
196
197 <textarea id="elm4" name="elm4" rows="15" cols="80" style="width: 80%">
198 &lt;p&gt;
199 This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
200 &lt;/p&gt;
201 &lt;p&gt;
202 Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
203 &lt;/p&gt;
204 </textarea>
205
206 <br />
207 <input type="submit" name="save" value="Submit" />
208 <input type="reset" name="reset" value="Reset" />
209 </form>
210 <script type="text/javascript">
211 if (document.location.protocol == 'file:') {
212 alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
213 }
214 </script>
215 </body>
216 </html>