We’re importing data in JSON format to Kirby to create virtual pages. The JSON file uses markdown and \n
to indicate a new line. ->kt()
doesn’t recognise the line break.
How do I solve this?
We’re importing data in JSON format to Kirby to create virtual pages. The JSON file uses markdown and \n
to indicate a new line. ->kt()
doesn’t recognise the line break.
How do I solve this?
try $mystring = str_replace("\n", PHP_EOL, $mystring);
before using the string in the virtual page constructor.