forum text editor now supports Markdown, images, file attachment, code blocks

wjcroftwjcroft Mount Shasta, CA
edited August 2019 in General Discussion

The new version of Vanilla Forum software we are now running, allows many more options for inserting formatted text, quotes, code segments, images, and attached files. Most of the WYSIWYG formatting icons at the top of the text composition window, work as expected. The Markdown syntax is applied as you direct. You will not see the change immediately in the composition window. Only when you hit the Preview button or Save button.

With attachments and images, drag and drop is supported.

One feature that may be less obvious, is the use of the 'code' formatting feature. If you just want an in-line section of monospaced code (no newlines), you can use the paragraph-icon dropdown to label the code line. This will place single backquotes around the line, the Markdown syntax for monospace in-line code.

If you want to insert a pre-formatted code block with newlines and indented formatting, precede the code block with a line containing FOUR BACKQUOTES in a row, on that separate line. Then follow the code block with another separate line containing four backquotes. This bracketing of the code block will then be recognized as formatted code. And indeed, the code is also run through a syntax prettifier to highlight keywords. Your original indenting is preserved. The block is additionally line numbered. Here is an example:

body .BoxButtons .Button.Primary, body .FormWrapper .Buttons .Button.Primary {
    background-color: #abcd08;
    border-color: #A3C402;
}

You can also use HTML syntax mixed in with your Markdown. Such as the 'pre' tag for specifying pre-formatted / indented text. This appears to trigger the line numbers, but might avoid the keyword highlights.

The link shown beneath the text composer window, explains more about the Markdown syntax.

William

Comments

  • wjcroftwjcroft Mount Shasta, CA

    PLEASE, limit the size of any images you upload.

    Here are some sample sizes in pixels and megabytes:

    http://www.bestprintingonline.com/resolution.htm#size

    Typical browser windows are generally less than 1000 pixels high. So images over 2 or 3 megabytes in size do not give any display advantage and waste space on the server.

Sign In or Register to comment.