Questions tagged [markdown]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
69 views

How to add target to link within field instructions?

I don't see anything in the documentation about how flexible the instructions fields are, as they use Markdown syntax. It's not clear how to add a target to a link, for example.
0
votes
1answer
116 views

How can I add and replace classes in the markdown field?

Prompt please both in the field {{ block.markdownContent|markdown|raw }} replace and add classes? For example: <p> replace by: <p class="section__paragraph text"> <h2> replace by: ...
1
vote
1answer
278 views

How to link to an entry in a Markdown field in the CMS

I want to do something that's perhaps connected to the id so that if the title/slug updates, then I don't have to hunt anything down in entries across the CMS. Something like this maybe? [Link to an ...
1
vote
2answers
156 views

Render markdown as GFM (GitHub Flavored Markdown), therefore preserving line breaks?

In particular, I'm trying to render the text in markdown preserving the original line breaks, like in the GitHub Flavored Markdown specifications. Using {{ something | md }} in a template the output ...
2
votes
2answers
496 views

Using a back reference inside a regex search string within replace filter

I’m trying to insert a programmatically generated id attribute into child elements of parsedown processed text. I'm aware that Craft’s twig replace filter incorporates preg_replace, so… I have a ...
2
votes
1answer
360 views

Bold first word in title field

Site design I am working on the first word of ever page title is bold. The code looks like this; <h1 class="section__heading"><strong>Discover</strong> Riaflex Today</h1> I ...
5
votes
2answers
672 views

Parse a line of Markdown, without <p>

Is there a way to parse a line of Markdown within Twig – without the surrounding <p> tags? I see there is a StringHelper method called ParseMarkdownLine that does exactly what I'd like, but I ...