How To Create Code Blocks in Posts

Skuid posts can be created using Markdown, HTML, and BBCode. We recommend using markdown since it allows for easy formatting of code and text as well as strips HTML out of posts by default to prevent security risks.

To format code so it’s visible, either wrap it in single backticks for a small amount of code, or triple backticks on an otherwise blank line before and after for a large amount of code.

How-Tos

Inline code

To indicate a small span of code, wrap it in backticks ( ``` ). For example:

How do I use the `console.log()` function?

would produce:

How do I use the console.log() function?

Code Blocks

Toolbar Icon
Using the Preformatted Text icon on the toolbar

This will automatically create a code block in which you can paste your code.

Manually

To indicate a code block, either wrap the entire block in three backticks:

``` ```

Or you can indent the code with four (4) spaces:

    <!DOCTYPE html>
    <html>
      <head>
        <!-- metadata and external resources-->
      </head>
      
      <body>
        <!-- page content -->
      </body>
    </html>

The first produces:

<!DOCTYPE html>
<html>
  <head>
    <!-- metadata and external resources-->
  </head>
  
  <body>
    <!-- page content -->
  </body>
</html>

The second produces:

<!DOCTYPE html>
<html>
  <head>
    <!-- metadata and external resources-->
  </head>
  
  <body>
    <!-- page content -->
  </body>
</html>