foreach my $f ($q->param("attachment_select")) {
$f=Encode::decode_utf8($f);
$f=~s/^$page\///;
- $add.="[[$f]]\n";
+ if (IkiWiki::isinlinableimage($f) &&
+ UNIVERSAL::can("IkiWiki::Plugin::img", "import")) {
+ $add.='[[!img '.$f.' align="right" size="" alt=""]]';
+ }
+ else {
+ $add.="[[$f]]";
+ }
+ $add.="\n";
}
$form->field(name => 'editcontent',
value => $form->field('editcontent')."\n\n".$add,
page does not exist, so it can be easily created.
* edittemplate: Look for template pages under templates/ like everything
else (still looks in old location for backwards compatability).
+ * attachment: When inserting links, insert img directives for images,
+ if that plugin is enabled.
-- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400