remove patch, and more comments
[ikiwiki] / doc / todo / mdwn_preview.mdwn
1 The [StackOverflow](http://stackoverflow.com/) site uses markdown for markup.
2 It has a fancy javascript thing for showing a real-time preview of what the user
3 is editing. It would be nice if ikiwiki could support this, too. The thing they
4 use on StackOverflow is supposed to be free software, so it should be easy to
5 add to ikiwiki.
6
7 > See [[wikiwyg]]. Note that I do not have a copy of the code for that, or
8 > it'd be in ikiwiki already. --[[Joey]] 
9
10 >> I just had a brief look at the [[wikiwyg]] page and the link to the plugin was
11 >> broken.  The StackOverflow site uses the [WMD](http://wmd-editor.com/) editor,
12 >> which seems to be related to the [ShowDown](http://attacklab.net/showdown/)
13 >> javascript port of Markdown.  Interestingly, [WMD source](http://wmd.googlecode.com/)
14 >> is now available under an MIT license, though it is supposedly undergoing heavy
15 >> refactoring.  It looks like there was previous discussion ( [[todo/Add_showdown_GUI_input__47__edit]] )
16 >> about a showdown plugin.  Maybe a WMD plugin would be worthwhile.  I might
17 >> look into it if I have time on the weekend. -- [[Will]]
18
19 [[!tag wishlist]]
20
21 >>> Below is a simple plugin/[[patch]] to make use of the WMD editor.
22
23 >>>> Now added to ikiwiki, thanks! --[[Joey]] 
24
25 >>> Turns out it isn't hard at all to
26 >>> get a basic version going (which doesn't handle directives at all, nor does it swtich itself off when you're
27 >>> editing something other than Markdown source).  I've
28 >>> removed the done tag so this is visible as a patch. -- [[Will]]
29
30 >>> Hmm, it would be good if it turned off for !mdwn. Although this could
31 >>> be difficult for a new page, since there is a dropdown selector to
32 >>> choose the markup language then. But it should be doable for editing an
33 >>> existing page.
34 >>>
35 >>> Can I get a license statement (ie, GPL-2+) ffrom you for the plugin?
36 >>> --[[Joey]] 
37
38 > So, I wonder if I should add a copy of the WMD source to ikiwiki, or rely
39 > on the user or distribution providing it. It does not seem to be packaged
40 > for Debian yet. Hmm, I also can't find any copyright or license info in
41 > the zip file. --[[Joey]] 
42
43 Note that the WMD plugin does **not** handle directives.  For this reason the normal `preview` button
44 remains.  Some CSS to clean up the display of the live WMD preview would be good.
45
46 > Can you elucidate the CSS comment -- or will it be obvious what you mean
47 > when I try it? Is it what's needed for the live preview? --[[Joey]]
48
49 > Hmm, now that I've tried it, I notice that it does live preview by
50 > default, below the edit window. Which is nice, but then if I hit the
51 > preview button, I get two previews.. which is confusing. (Also, minor,
52 > but: the live preview is missing the >Page Preview:" header.) --[[Joey]]