X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ea33ebfc69a490768ace90ca94a87cac972f7565..651cdd4b2a85f4e5f9d298a7eea7d0e6d94442b1:/doc/todo/pagedown_plugin/discussion.mdwn?ds=sidebyside diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn index 6810c5e40..42015c4ff 100644 --- a/doc/todo/pagedown_plugin/discussion.mdwn +++ b/doc/todo/pagedown_plugin/discussion.mdwn @@ -1,3 +1,5 @@ +(This conversation was moved from [[plugins/wmd/discussion]]. --[[anarcat]]) + I've tried to retrieve the wmd-editor source tarball lately, but the site seems offline. From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA. @@ -93,4 +95,52 @@ Given all the above, what about upgrading this plugin to use pagedown instead of >> And besides: the point here is that we *can't actually use WMD safely*, but >> we **can use pagedown safely!**. >> ->> So let's work on merging that pretty branch already shall we? :) --[[anarcat]] +>> I tried the plugin: it works, and it works well. It's also fairly trivial to +>> install the upstream showdown library, which is not shipped with the plugin +>> (which alleviates all possible copyright problems). You can take test the +>> plugin at +>> +>> There are only three issues I could find during testing: +>> +>> 1. two previews are showed (the showdown one and the regular ikiwiki one), +>> which can be confusing, but is still necessary because the showdown one +>> doesn't parse ikiwiki directives. +>> 2. the wiki needs to be rebuilt when the plugin is first activated for the +>> stylesheets to regenerate. new wikis are not affected, and this can be +>> deployed massively on farms without user intervention. +>> 3. on large pages, the edit screen isn't in the first screen, so it's not +>> obvious we're editing the page, which is also a little confusing - we +>> would need an anchor in there... Update: a simple patch fixes that... +>> but in a rather crude way: +>> +>> [[!format diff """ +--- a/IkiWiki/Render.pm ++++ b/IkiWiki/Render.pm +@@ -87,7 +87,7 @@ sub genpage ($$) { + my $actions=0; + if (length $config{cgiurl}) { + if (IkiWiki->can("cgi_editpage")) { +- $template->param(editurl => cgiurl(do => "edit", page => $page)); ++ $template->param(editurl => cgiurl(do => "edit", page => $page) . '#editcontent'); + $actions++; + } + } +"""]] +>> ideally, we would show the edit box next to the page preview... And there's a way to do that too! But it requires some more CSS hackery, like [this](http://css-tricks.com/scrollfollow-sidebar/), for example: +>> +>> #wmd-preview { +>> position: relative; +>> margin: 15px auto; +>> float: left; +>> width: 50%; +>> } +>> form { +>> position: fixed; +>> margin-left: 50%; +>> } +>> +>> But this is getting a little crazy and I need to sleep now. +>> +>> [[!template id=gitbranch branch=anarcat/pagedown author="[[anarcat]]"]] +>> +>> Anyways, let's work on merging that pretty branch already shall we? :) --[[anarcat]]