From: Joey Hess Date: Wed, 7 Jul 2010 19:42:41 +0000 (-0400) Subject: initial stab at getting wmd-new working X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/a53a76e33ca0802910813021f0feafacda6afbf1 initial stab at getting wmd-new working http://github.com/derobins/wmd Not sure I like it as much as old wmd, but it is at least maintained and at least has a license. --- diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm index 71d7c9d17..30fe5b813 100644 --- a/IkiWiki/Plugin/wmd.pm +++ b/IkiWiki/Plugin/wmd.pm @@ -29,9 +29,14 @@ sub formbuilder_setup (@) { return unless $form->field("do") eq "edit" || $form->field("do") eq "create" || $form->field("do") eq "comment"; + + $form->tmpl_param("wmd_button_bar", "
\n"); - $form->tmpl_param("wmd_preview", "
\n". + $form->tmpl_param("wmd_preview", "
\n". include_javascript(undef, 1)); + + $form->field(name => "editcontent", class => "wmd-panel", id => + "wmd-input"); } sub include_javascript ($;$) { @@ -39,12 +44,15 @@ sub include_javascript ($;$) { my $absolute=shift; my $wmdjs=urlto("wmd/wmd.js", $page, $absolute); + my $showdownjs=urlto("wmd/showdown.js", $page, $absolute); + return <<"EOF" + EOF } diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl index d6ad80614..edce136e9 100644 --- a/templates/editpage.tmpl +++ b/templates/editpage.tmpl @@ -15,6 +15,7 @@
+