Hi everyone,
I have a little problem trying to use footnotes in an additionally defined textarea (named intro). c::set('markdown.extra', true);
is part of the config and I’ve have updated markdown as suggested in this post Markdown (Extra) Footnotes don’t render as HTML but text
Markdown is defined in the blueprint for both the normal and additional textarea:
intro:
label: Intro
type: markdown
text:
label: Text
type: markdown
Using [^1] and [^1]:
in the normal text field works, but not the one labeled intro
. Both are included in the template using kirbytext()
<?= $page->intro()->kirbytext() ?>
<?= $page->text()->kirbytext() ?>
From what I’ve seen in the code, it looks like only fields with a label named “Text” go through markdown conversion? I don’t want to use an additional/external plugin if at all avoidable. Any solutions?
thanks for your help
Tina
You are using two different field types and there is not even a field type called markdown. I don’t know if that is causing your issue, but it doesn’t make sense.
1 Like
Thanks Sonja,
gee, yes! you’re right, defining type twice is wrong. I removed the type: textarea in my blueprint, but unfortunately the problem persists as described.
Hmm, I guess my logic is wrong though … it does work if I place the footnote at the end of the same markdown field … I thought it wouldn’t matter if I place the initial marker in the intro field and the actual footnote with text in the text field. But they have to be in the same field, otherwise it won’t work.
Yes, of course you should put the footnote into the same field, they are handled as two separate entities. Also, unless you have installed a plugin with a field type markdown
: Kirby doesn’t have such a field, the field type is textarea
. I am a bit surprised that the Panel doesn’t throw an error.
1 Like
Mmh, interesting! because, no, I haven’t installed any plugin.
I’m using the integrated markdown or should I say “parsedown” functionality as mentioned here (https://getkirby.com/docs/cheatsheet/options/markdown-parser). If I name the type “textarea”, then I don’t see the markdown being parsed (see green text in image) in the content field … I’m using Kirby 2.5.12 more or less out of the box.
The only thing I did do was to update parsedown as described in this post (Markdown (Extra) Footnotes don’t render as HTML but text)
What you are using there is a plugin field, not a native field, probably this one: https://github.com/SebastianEberlein/kirby-markdown-field
List of native field types:
https://getkirby.com/docs/cheatsheet#panel-fields
1 Like
Yes, you’re absolutely right! My apologies, I think I’m getting old
I did install that. Sorry Sonja. That explains the strange non-native type name.
Anyway, I guess my problem is not a problem - case closed.
Thanks for your patience.
You are welcome, Tina, no problem at all.
1 Like