Create instruction page for markdown fields
authorMagnus Hagander <magnus@hagander.net>
Mon, 9 Nov 2020 17:14:09 +0000 (18:14 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 12 Nov 2020 17:53:16 +0000 (18:53 +0100)
Instead of directly linking to the spec, include some basic info and a
list of our limitations.

media/js/markdown_preview.js
templates/pages/account/markdown_submission.html [new file with mode: 0644]

index 54a318643d039a488dd9b3a67b60929d6252f952..fdf9bdd6119a11c31ffb626a05e3b2475d4cd7de 100644 (file)
@@ -23,7 +23,7 @@ function attach_markdown_preview(objid, admin) {
 
     obj.parentNode.insertBefore(newdiv, obj.nextSibling);
 
-    obj.infospan_html_base = admin ? '' : 'This field supports <a href="https://daringfireball.net/projects/markdown/basics" target="_blank" rel="noopener">markdown</a>. See below for a preview.';
+    obj.infospan_html_base = admin ? '' : 'This field supports <a href="/account/markdown_submission/" target="_blank" rel="noopener">markdown</a>. See below for a preview.';
 
     obj.infospan = document.createElement('span');
     obj.infospan.innerHTML = obj.infospan_html_base;
diff --git a/templates/pages/account/markdown_submission.html b/templates/pages/account/markdown_submission.html
new file mode 100644 (file)
index 0000000..a50f619
--- /dev/null
@@ -0,0 +1,44 @@
+{%extends "base/page.html"%}
+{%block title%}Markdown submission{%endblock%}
+{%block contents%}
+<h1>Markdown submission</h1>
+
+<p>
+ Some forms on the postgresql.org website allows you to submit text
+ in <em>markdown</em> format. This is a simple markup format that lets
+ you do basic formatting inline.
+</p>
+
+<p>
+ You can find a basic introduction to markdown at
+ <a href="https://www.markdownguide.org/">markdownguide.org</a>.
+</p>
+
+<p>
+ This site
+ supports <a href="https://www.markdownguide.org/basic-syntax/">basic</a>
+ markdown syntax with the following exceptions:
+</p>
+
+<ul>
+ <li>Images are not allowed</li>
+ <li>Relative links are not allowed, only absolute links</li>
+ <li>Links to any protocol other than <em>http</em>, <em>https</em>
+  or <em>mailto</em> are not allowed.</li>
+ <li>Inline HTML may be used, but it is only allowed to use the same
+  tags and attributes produced by markdown. It is strongly
+  recommended to use vanilla markdown.</li>
+</ul>
+
+<h2>Preview</h2>
+<p>
+ The <em>live preview</em> of markdown fields does not work on
+ Internet Explorer.
+</p>
+<p>
+ The preview is updated asynchronously, so there may be a few seconds
+ delay between making a change and the preview updating, depending on
+ network speed.
+</p>
+
+{%endblock%}