Tildes and comment formatting, markdown: a quick and dirty guide
At the suggestion of a certain heathen who shall remain unnamed. I'm tossing up a quick and dirty comment (and post text) formatting guide. There is a formatting guide in the docs/wiki with a link just above the comment box, but it can be a bit much to digest.
*italics*
**bold**
~~strikethrough~~
[Text goes here](URL goes here)
<small>small text</small>
<sub>subscript</sub>
<sup>superscript</sup>
# headline
`code which removes the formatting and makes it look like this block`
* bulleted
* lists
1. and
1. numbered
1. lists
Spoilers is a bit more complicated, the <details>
start and end </details>
is required, but the <summary>
start and end </summary>
is not unless you want text in the summary or you want the summary to be blank.
<details>
<summary>Summary text!</summary>
Body text inside spoiler!
</details>
Or you can have a summary...
...like this.
Or by leaving the text between the summary code blank you can have the box be empty but still have spoiler text within
You can use formatting like bold, italics, or even...
...spoilers within spoilers!
...but you have to leave an extra line above this or it *won't work* and your formatting will be revealed to **all!**Three underscores (or dashes, but dashes require an extra line) in a row on their own line creates a blank line to divide a topic...
---
You also have a sub-headline text option by putting a single dash under text...
-
...or headline text by putting an equal sign under text.
=
If you like userscripts (who doesn't?) you can install extensions like ViolentMonkey that allow you to install little bits of code like the Tildes Formatting Toolbar that can change/improve the sites you use and make formatting here a breeze.
Do use the formatting responsibly, but here are examples for bold, italics, strikethrough, links, small text, subscript, superscript,
headline text,
sub-headline text,
code,
- bulleted
- lists,
- and
- numbered
- lists
Most formatting can be combined as well such as superscripts, lines, and small text to make...
...sentences with a...1
1...footnote
A quick one on tables too.
To have a table, just draw (I mean, type) something out that looks like a table but use the pipe character (
|
) to denote the start and end of a column.The first line will render as a heading row in your table (as it should). The second line, which is also mandatory but easily missed, defines how the data in each of the columns should be aligned, but we discuss more on alignments in the next example. You can use additional spaces before and after the cell data to make the pipe characters look aligned, but it's not important at all. So, this is the table the above markdown yields:
Now for the example with alignments specified on the columns. Note, the colon (
:
) characters that are now there in the second line:If a colon is present on both ends of the dashes (
-
), as is on the second column, then all the values in the column will be center aligned. If the colons are present only on the right, or left side of the dashes, then they will be aligned respectively. Note that left alignment is the default so no need to mention colons in that case. This gives us the table:As an aid, I often use this online table generator: https://www.tablesgenerator.com/markdown_tables when I want my raw markdown tables to also look aligned, or when I'm not sure where I might have done something wrong.
The Tildes doc on text formatting does cover most of what is said here but I felt like we could be slightly more wordy here. Tildes doc: https://docs.tildes.net/instructions/text-formatting#tables
A slight word about the syntax discussed... It's not necessary that this exact syntax, or even tables at all will work in other platforms that also support Markdown . The original Markdown spec is very ambiguous about what it supports (and even how it supports) but it clearly does not support tables. The CommonMark spec (which Tildes uses) gets rid of Markdown's ambiguity and makes the original Markdown spec more standard, but it doesn't support tables as well. Tildes makes tables supported by using at least one CommonMark extension. With that said, this syntax is the most popular one as is used by GitHub, GitLab, Reddit, etc. It's safe to assume that wherever Markdown tables are supported, this syntax should work.
With the tables in markdown mentioned, I often also prefer the html way. Like OP has mentioned in case of
<details>
, tables in html have to start with<table>
and end with</table>
. Each row starts with a<tr>
(and optionally end with a</tr>
). Each table cell starts with a<td>
, and optionally end with a</td>
. So here is an example of a simple table in html:This is how the table looks rendered:
To me, this style of table looks readable enough in raw text and since each cell data is in its own line, I have the flexibility to:
<caption>
tagA little disclaimer: I understand that regular users of html (myself included) might scoff at the idea of not closing the seemingly "dangling" tags that were left opened, but I find it passable in this case, since we're all just users here, writing something in a text field; and not in the source code of an html file. Apart from that, the w3c spec also allows to leave
<tr>
tags opened if followed by another<tr>
tag: https://www.w3.org/html/wg/spec/syntax.html#optional-tagsOf note is that the formatting toolbar is also a feature found in the Tildes ReExtended browser extension.
This heathen thanks you :)
Oh, hell yeah
That is super annoying to type, though, especially on a phone.
Adding a keyboard shortcut on your phone for some of the more annoying things may be something that you find very useful. Especially if you know you'll use some of these a lot.
I suggest Unexpected Keyboard for this. It's like the full keyboard but with excellent UX for mobile.
It can even
<Ctrl+v>
to paste,<Ctrl+Backspace>
to delete a word, and all that.Typing this comment using it too!
Good idea but with just Gboard (and pretty much all standard keyboards) you can just put things into your custom dictionary ¯\_(ツ)_/¯ (that's "zqshrug" for me).
That looks very cool. Gotta try it for my self.
But how do you manage the symbols with that approach? Like:
_
,[
,|
?I guess you could setup something like typing
zqlink
to give you[]()
and then move the cursor between the braces.Yes, perhaps I would do zqsmall for and qzsmall for . But the individual symbols aren't an issue. The problem is pressing ?123--=\<--<--s--m--a--l--l--?123--=\<-->, then type what I want to be small, then ?123--=\<--<--?123--s--m--a--l--l--?123--=\<-->.
I have to say, I've essentially been using this keyboard since approximately when you suggested it, and it's been wonderful
Yay, thanks! This is my first bookmark and will come handy.
I'm hung up on the links instructions, because whenever I've tried, it's not working. I used brackets for the text, and parenthesis for the link, for example, brackets but it shows up in the comment without the link inserted, and instead it still shows what I literally type. And upon previewing this comment, it still did not due what the formatting help says it will do.
I'd love anyone to instruct me about whatever error(s) I'm making.
edit: I took the space between the two components out, as suggested by the reply beneath (Thank you!), and it made the link correct. So the format needs to be [text]no space(link) but in every instruction I'm reading it appears to me like [text]space(link), even on the instructions in this post.
There isn't a space between the two components.
Are you saying there should or should not be a space between them? *edit: Never mind. There should not.
Solid, thank you
Please add a formatting bar to the comment box that can be enabled or disabled. Mobile typing is a killer for formatting if you don't know markdown off the top of your head. It on needs the basics like italics, bold, strike through. The usual typing aids.
The OP can't do what you're asking. They're just describing the existing markdown features. They don't run Tildes. They don't write code for Tildes (as far as I know). They're just listing the available formatting features in one easy-to-read guide.
This formatting bar you've requested is already included in the ever-growing list of features to be added to Tildes in the future. We'll get it... one day!
In the meantime, one helpful Tilder has created a browser extension which includes a toolbar showing the various formatting options, which will do exactly what you're asking for here.
And, as a final suggestion... if you want to request a product feature, I highly recommend that you post a new topic in ~tildes for more visibility, rather than burying it as a comment on someone else's topic.
I think you can use a browser extension that enhances the current UI/UX of Tildes, much like what RES was for Reddit. Tildes ReExtended should have what you want: https://tildes.net/~tildes/17kq/tildes_reextended_has_been_updated_and_is_also_back_on_the_chrome_web_store_again
And for iOS, an app is in the works. Surfboard: https://tildes.net/~tildes/17kq/tildes_reextended_has_been_updated_and_is_also_back_on_the_chrome_web_store_again
Android users... Might feel left out but not necessarily so. Because...
For the basics like you have mentioned, I think Markdown's syntax is intuitive enough that bolds, italics, strikethroughs don't very strongly suggest an upgrade to the simple Text Field.
*
to add first level of emphasis: italics*
for added emphasis, i.e. bold*
for even more... Italic and bold~
):~~Cut me~~
:Cut me.Lists, and smalls are simple enough too.
But I do admit, the UX could improve, if for example I could highlight the parts of text I want make bold, and just press a button to do so. Right now, I can, select what I want to bold, choose
Cut
from context menu, add the*
s, go between the*
s and paste.On the other hand, If I do put down my preference, it's on the simple text field.
TYVM