X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fmessages.c;fp=webcit%2Fmessages.c;h=3c3c92f6dd2f3b1aced34d0a484c81cfeee63278;hp=7ac906d62f6e5a673990cdeca684c58e1778d50f;hb=9f86bcfb5f58af7d3d9378583ba493f125c530b0;hpb=da50399f0bdee623a41a7c7b9a5469ef2a920359 diff --git a/webcit/messages.c b/webcit/messages.c index 7ac906d62..3c3c92f6d 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1366,6 +1366,10 @@ void display_enter(void) int i = 0; long replying_to; + int prefer_md; + + get_pref_yesno("markdown", &prefer_md, 0); + if (havebstr("force_room")) { gotoroom(sbstr("force_room")); } @@ -1695,7 +1699,7 @@ void display_enter(void) begin_burst(); output_headers(1, 0, 0, 0, 1, 0); - if (WCC->CurRoom.defview == VIEW_WIKIMD) + if ((WCC->CurRoom.defview == VIEW_WIKIMD) || prefer_md) DoTemplate(HKEY("edit_markdown_epic"), NULL, &NoCtx); else DoTemplate(HKEY("edit_message"), NULL, &NoCtx); @@ -2056,6 +2060,8 @@ InitModule_MSG PRF_STRING, NULL); RegisterPreference("mailbox",_("Mailbox view mode"), PRF_STRING, NULL); + RegisterPreference("markdown",_("Prefer markdown editing"), PRF_YESNO, NULL); + WebcitAddUrlHandler(HKEY("readnew"), "", 0, h_readnew, ANONYMOUS|NEED_URL); WebcitAddUrlHandler(HKEY("readold"), "", 0, h_readold, ANONYMOUS|NEED_URL);