Mercurial > public > madeira
diff static/js/tinymce/jscripts/tiny_mce/plugins/preview/example.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/static/js/tinymce/jscripts/tiny_mce/plugins/preview/example.html Thu Mar 15 20:02:39 2012 -0500 @@ -0,0 +1,28 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<script language="javascript" src="../../tiny_mce_popup.js"></script> +<script type="text/javascript" src="jscripts/embed.js"></script> +<script type="text/javascript"> +tinyMCEPopup.onInit.add(function(ed) { + var dom = tinyMCEPopup.dom; + + // Load editor content_css + tinymce.each(ed.settings.content_css.split(','), function(u) { + dom.loadCSS(ed.documentBaseURI.toAbsolute(u)); + }); + + // Place contents inside div container + dom.setHTML('content', ed.getContent()); +}); +</script> +<title>Example of a custom preview page</title> +</head> +<body> + +Editor contents: <br /> +<div id="content"> +<!-- Gets filled with editor contents --> +</div> + +</body> +</html>