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