Markdown markdown

When you are authoring, the content fragment editor uses markdown syntax to allow you to easily write content for either headless delivery or page authoring:

NOTE
Content Fragments are a Sites feature, but are stored as Assets.
There are two editors for authoring Content Fragments. This section covers the original editor, primarily accessed from the Assets console. See the Sites documentation, Content Fragments - Authoring, for details of the new editor (primarily accessed from the Content Fragments console).

Markdown editor

You can define:

Heading Notation heading-notation

To create a header by placing a hash tag (#) in front of the heading. One hash tag (#) is used for an H1, two hash tags (##) for a H2 and so on. You can use up to 6 hash tags. For example:

## This is an H2

### This is an H3

###### This is a H6

Optionally, you can create a H1 by underlining the text in equal signs and create a H2 by underlining the text in minus signs. For example:

This is an H1

=============

This is an H2

-------------

Paragraphs and Line Breaks paragraphs-and-line-breaks

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. A blank line is a line containing nothing but spaces or tabs. Normal paragraphs should not be indented with spaces or tabs.

A line break is created by ending a line with two or more spaces then a return.

You can create inline and reference links.

In both styles, the link text is delimited by square brackets [].

These are examples of inline links:

This is [an example](https://example.com/ "Title") inline link.

This is [an example of an email link](emailto:myaddress@mydomain.info)

[This link](https://example.net/) has no title attribute.

A reference link has the following syntax:

Hey you should [checkout][0] this [cool thing][wiki] that I [made][].

[0]: https://www.google.ca

[wiki]: https://www.wikipedia.org

[made]: https://www.stackoverflow.com

Images images

The syntax for images is similar to the links. You can create inline and referenced images.

For example, an inline image has the following syntax:

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")

The syntax includes:

  • An exclamation mark: !;
  • followed by a set of square brackets, containing the alt attribute text for the image;
  • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

A Reference-style image has the following syntax:

![Alt text][id]

Where “id” is the name of a defined image reference. Image references are defined using syntax identical to link references:

[id]: url/to/image "Optional title attribute"

Block Quotes block-quotes

You can quote text by adding the > symbol before the text. For example:

>This is block quotes

>asdhfjlkasdhlf

>asdfahsdlfasdfj

You can have nested block quotes. For example:

> This is the first level of quoting.

>

>> This is nested blockquote.

>

> Back to the first level.

Lists lists

You can create both ordered and unordered lists.

To create an unordered list, use the * symbol before the items in the list. For example:

* item in list

* item in list

* item in list

To create an ordered list, add the numbers, followed by a period, before each item in the list. For example:

1. First item in list.

2. Second item in list.

3. Third item in list.

Emphasis emphasis

You can add italic or bold styling to your text.

To can add italics as follows:

*single asterisks*

_single underscores_

Keyboard shortcut: Ctrl-I (Cmd-I)

You can bold text as follows:

**double asterisks**

__double underscores__

Keyboard shortcut: Ctrl-B (Cmd-B)

To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph.

For example:

Use the `printf()` function.

Code Blocks code-blocks

Code blocks are typically used to illustrate source code. You can create code blocks by indenting the code using a tab or a minimum of 4 spaces. For example:

This is a normal paragraph.

This is a code block.

Backslash escapes backslash-escapes

You can use backslash escapes to generate literal characters which have special meaning in formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can use backslashes before the asterisks, like this:

\\*literal asterisks\\*

Backslash escapes are available for the following characters:

\ backslash

` backtick

* asterisk

_ underscore

{} curly braces

[] square brackets

() parentheses

# hash mark

+ plus sign

- minus sign (hyphen)

. dot

recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab