Editing markdown in the Visual Editor

Last modified: November 22nd, 2023

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

Markdown files can be opened in Visual Editor if these conditions are met:

  • The page has a layout defined and is output on the built site
  • In the layout, there must be an element surrounding the output of the Markdown content, and it can’t have any other children.

For example, Markdown files that use this layout can be opened in the Visual Editor:

specific doc

page.html
copied
<div class="content">
  {{ content }}
</div>

specific doc

single.html
copied
<div class="content">
  {{ .Content }}
</div>

specific doc

page.njk
copied
<div class="content">
  {{ content | safe }}
</div>

specific doc

There's no official support to automatically create an Editable Region for content in other SSGs as the way they render content varies greatly.

Markdown files that use this layout can not be opened in the Visual Editor:

specific doc

page.html
copied
<div class="content">
  {{ content }}
  <p> Some other content</p>
</div>

specific doc

single.html
copied
<div class="content">
  {{ .Content }}
  <p> Some other content</p>
</div>

specific doc

page.njk
copied
<div class="content">
  {{ content | safe }}
  <p> Some other content</p>
</div>

specific doc

Not applicable.

Related Articles

Open in a new tab