Could be made more efficient by combining some files, but tihs is just
the /admin/ interface so not used very often.
--- /dev/null
+window.onload = function() {
+ tael = document.getElementsByTagName('textarea');
+ for (i = 0; i < tael.length; i++) {
+ if (tael[i].className.indexOf('markdown_preview') >= 0) {
+ attach_showdown_preview(tael[i].id, 1);
+ }
+ }
+}
<link rel="stylesheet" type="text/css" href="/media/css/showdown_preview.css" />
<script type="text/javascript" src="/media/showdown/showdown.js"></script>
<script type="text/javascript" src="/media/js/showdown_preview.js"></script>
-<script type="text/javascript">
- window.onload = function() {
- tael = document.getElementsByTagName('textarea');
- for (i = 0; i < tael.length; i++) {
- if (tael[i].className.indexOf('markdown_preview') >= 0) {
- attach_showdown_preview(tael[i].id, 1);
- }
- }
- }
-</script>
+<script type="text/javascript" src="/media/js/admin_pgweb.js"></script>
{%endblock%}
{%if notifications%}