diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-03-07 18:54:26 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-03-07 18:54:26 -0500 |
commit | 72dd9a9a0434e1682d7e27b935500c010a03dddc (patch) | |
tree | 11af7e24d2ea271ff3a226636fc328f2f4400e4b | |
parent | 7ca39f49db67de756795ad419791082e115fbd98 (diff) | |
download | ikiwiki-72dd9a9a0434e1682d7e27b935500c010a03dddc.tar ikiwiki-72dd9a9a0434e1682d7e27b935500c010a03dddc.tar.gz |
make wmd comment support comment editing (I think)
-rw-r--r-- | IkiWiki/Plugin/wmd.pm | 5 | ||||
-rw-r--r-- | templates/editcomment.tmpl | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm index 3372ffe38..9e9f17f7f 100644 --- a/IkiWiki/Plugin/wmd.pm +++ b/IkiWiki/Plugin/wmd.pm @@ -26,8 +26,9 @@ sub formbuilder_setup (@) { return if ! defined $form->field("do"); - return unless (($form->field("do") eq "edit") || - ($form->field("do") eq "create")); + return unless $form->field("do") eq "edit" || + $form->field("do") eq "create" || + $form->field("do") eq "comment"; $form->tmpl_param("wmd_preview", "<div class=\"wmd-preview\"></div>\n". include_javascript(undef, 1)); diff --git a/templates/editcomment.tmpl b/templates/editcomment.tmpl index 891bcae65..7590cdfd7 100644 --- a/templates/editcomment.tmpl +++ b/templates/editcomment.tmpl @@ -15,6 +15,7 @@ Subject: <TMPL_VAR FIELD-SUBJECT><br /> <TMPL_VAR FORM-SUBMIT> <TMPL_VAR FIELD-TYPE> <TMPL_VAR HELPONFORMATTINGLINK><br /> IkiWiki directives ([[!directive]]) are <TMPL_UNLESS NAME="ALLOWDIRECTIVES">not </TMPL_UNLESS>allowed in comments on this wiki.<br /> <TMPL_VAR NAME="FORM-END"> +<TMPL_VAR WMD_PREVIEW> <TMPL_IF NAME="PAGE_PREVIEW"> <hr /> |