Check out Symmetric Chess, our featured variant for March, 2024.

Enter Your Reply

The Comment You're Replying To
🕸Fergus Duniho wrote on Mon, Nov 28, 2022 06:01 PM UTC:

I'm thinking of removing CKEditor from the site. In source mode, it has been reformatting text, which is annoying. I rewrote trim_lines to better handle ASCII diagrams, and it did a great job at that. In the test I ran, an ASCII diagram for Hexagonal Chess looked like this:

        a   b   c   d   e   f   g   h   i   j   k
                        ___
                    ___/ b \___                  8
                ___/:q:\___/:k:\___
            ___/!n!\___/!b!\___/!n!\___          7
        ___/ r \___/   \___/   \___/ r \___
    ___/:p:\___/:::\___/:b:\___/:::\___/:p:\___  6
   /!!!\___/!p!\___/!!!\___/!!!\___/!p!\___/!!!\
11 \___/   \___/ p \___/   \___/ p \___/   \___/ 5
   /:::\___/:::\___/:p:\___/:p:\___/:::\___/:::\
10 \___/!!!\___/!!!\___/!p!\___/!!!\___/!!!\___/ 4
   /   \___/   \___/   \___/   \___/   \___/   \
 9 \___/:::\___/:::\___/:::\___/:::\___/:::\___/ 3
   /!!!\___/!!!\___/!!!\___/!!!\___/!!!\___/!!!\
 8 \___/   \___/   \___/ P \___/   \___/   \___/ 2
   /:::\___/:::\___/:P:\___/:P:\___/:::\___/:::\
 7 \___/!!!\___/!P!\___/!!!\___/!P!\___/!!!\___/ 1
   /   \___/ P \___/   \___/   \___/ P \___/   \
 6 \___/:P:\___/:::\___/:B:\___/:::\___/:P:\___/
       \___/!R!\___/!!!\___/!!!\___/!R!\___/
 5         \___/ N \___/ B \___/ N \___/
               \___/:Q:\___/:K:\___/
 4                 \___/!B!\___/
                       \___/
     a   b   c   d   e   f   g   h   i   j   k

But when I load the content of the page in CKEditor, it looks like this:

<DIV>
  <PRE>
    a   b   c   d   e   f   g   h   i   j   k
    ___
    ___/ b \___                  8
    ___/:q:\___/:k:\___
    ___/!n!\___/!b!\___/!n!\___          7
    ___/ r \___/   \___/   \___/ r \___
    ___/:p:\___/:::\___/:b:\___/:::\___/:p:\___  6
    /!!!\___/!p!\___/!!!\___/!!!\___/!p!\___/!!!\
    11 \___/   \___/ p \___/   \___/ p \___/   \___/ 5
    /:::\___/:::\___/:p:\___/:p:\___/:::\___/:::\
    10 \___/!!!\___/!!!\___/!p!\___/!!!\___/!!!\___/ 4
    /   \___/   \___/   \___/   \___/   \___/   \
    9 \___/:::\___/:::\___/:::\___/:::\___/:::\___/ 3
    /!!!\___/!!!\___/!!!\___/!!!\___/!!!\___/!!!\
    8 \___/   \___/   \___/ P \___/   \___/   \___/ 2
    /:::\___/:::\___/:P:\___/:P:\___/:::\___/:::\
    7 \___/!!!\___/!P!\___/!!!\___/!P!\___/!!!\___/ 1
    /   \___/ P \___/   \___/   \___/ P \___/   \
    6 \___/:P:\___/:::\___/:B:\___/:::\___/:P:\___/
    \___/!R!\___/!!!\___/!!!\___/!R!\___/
    5         \___/ N \___/ B \___/ N \___/
    \___/:Q:\___/:K:\___/
    4                 \___/!B!\___/
    \___/
    a   b   c   d   e   f   g   h   i   j   k
  </PRE>
</DIV>

I can get it looking correct by turning CKEditor off, but it's still annoying.

Also, it has been treating unpaired tags as unclosed unless they end with /. Since it indents each unclosed tag further than the last one, things can easily get out of hand with lots of IMG or INPUT tags that do not have closing tags.

The WYSIWYG editor has filled a gap for people who don't know HTML, and it's a better option than writing everything in plain text. However, the option of using Markdown fills the same gap. Markdown is an intuitive markup language that borrows conventions common to plain text documents and replaces them with appropriate HTML. It is already the default format for entering comments, and you can see a Quick Markdown Guide if you look down while entering a comment in the Markdown format. Markdown combines the ease of writing a plain text document with the power of HTML.

And it also allows those who know HTML to mix in HTML with the Markdown.


Edit Form

Comment on the page How to Design and Post Your Own Game

Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.