I am using the default text block that comes with Sir Trevor but I can't figure out how to add linebreaks in the back office so they will render correctly in the front-end. Here is the snippet I am using to get the content.
@foreach(dynamic block in @CurrentPage.Content.data){
switch((string)block.type)
{
case "heading":
string heading = block.data.text;
<h2>@heading</h2>
break;
case "text":
string text = block.data.text;
@SirTrevor.Markdown(text)
break;
case "list":
string list = block.data.text;
@SirTrevor.Markdown(list)
break;
}
}
Line breaks in text block
I am using the default text block that comes with Sir Trevor but I can't figure out how to add linebreaks in the back office so they will render correctly in the front-end. Here is the snippet I am using to get the content.
Thanks in advance.
SirTrevor uses Markdown for texts, so placing two or more spaces at the end of the line should work.
is working on a reply...