Mercurial > public > sg101
annotate media/js/tiny_mce/plugins/preview/example.html @ 150:b43e1288ff80
Fix #33; use $.ajax instead of $.post so we can handle errors. Also, for some reason comparing objects in a template doesn't work now. Have to compare id fields.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 17 Dec 2009 04:14:16 +0000 |
parents | a5b4c5ce0658 |
children |
rev | line source |
---|---|
bgneal@45 | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
bgneal@45 | 2 <head> |
bgneal@45 | 3 <script language="javascript" src="../../tiny_mce_popup.js"></script> |
bgneal@45 | 4 <script type="text/javascript" src="jscripts/embed.js"></script> |
bgneal@45 | 5 <script type="text/javascript"> |
bgneal@45 | 6 tinyMCEPopup.onInit.add(function(ed) { |
bgneal@45 | 7 var dom = tinyMCEPopup.dom; |
bgneal@45 | 8 |
bgneal@45 | 9 // Load editor content_css |
bgneal@45 | 10 tinymce.each(ed.settings.content_css.split(','), function(u) { |
bgneal@45 | 11 dom.loadCSS(ed.documentBaseURI.toAbsolute(u)); |
bgneal@45 | 12 }); |
bgneal@45 | 13 |
bgneal@45 | 14 // Place contents inside div container |
bgneal@45 | 15 dom.setHTML('content', ed.getContent()); |
bgneal@45 | 16 }); |
bgneal@45 | 17 </script> |
bgneal@45 | 18 <title>Example of a custom preview page</title> |
bgneal@45 | 19 </head> |
bgneal@45 | 20 <body> |
bgneal@45 | 21 |
bgneal@45 | 22 Editor contents: <br /> |
bgneal@45 | 23 <div id="content"> |
bgneal@45 | 24 <!-- Gets filled with editor contents --> |
bgneal@45 | 25 </div> |
bgneal@45 | 26 |
bgneal@45 | 27 </body> |
bgneal@45 | 28 </html> |