Markdown Editor: Is there a way to escape Kirby tags?

Hi.

I have created a draft for my users in the Markdown Editor, where I list guidelines. This includes those where Kirby tags appear.

How can I escape Kirby tags within the Markdown Editor?

Example:

(url: domain.tld)

My current workaround:
(url: domain.tld)

That works. But it is laborious.

Is there a better universal way? Thank you.

On the getkirby website, we escape like this:

(\video: https://example.com/sample-video.mp4)

Then use a field method or hook that replaces it:

$text = preg_replace('/\\(\\\\([^:]+):/', '($1:', $text);
1 Like