Skip to main content

Questions tagged [markdown]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

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.
4midori's user avatar
  • 656
0 votes
1 answer

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: ...
paveell's user avatar
  • 31
1 vote
1 answer

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 ...
Ryan's user avatar
  • 1,952
1 vote
2 answers

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 ...
SoYou's user avatar
  • 13
2 votes
2 answers

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 ...
Jonathan Schofield's user avatar
2 votes
1 answer

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 ...
Terry Upton's user avatar
  • 1,894
6 votes
2 answers

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 ...
Avant la lettre's user avatar