Open binoclard opened 2 years ago
There's a ProseMirror footnote example here https://prosemirror.net/examples/footnote/
Bard is built on TipTap which is built on ProseMirror, so that might help when trying to implement something like this
How do you envision this working? Automatically "scraping" the links in the content, or creating an explicit footnote, or what?
I was imagining something like a Bard set, but "inline"?
You could create a footnote block, write its content, but it would insert a number at its place inside the paragraph, and then let you output/display/manipulate the actual content of the footnote elsewhere in the View.
I created a Footnotes system recently for a project: satellitedreaming.com (see Essays). It's a bit fragile (in terms of content authoring) but maybe it'll help anyone looking to do this.
[1]
, but you could of course do superscript ie: 1 )#f1
footnotes_set:
display: Footnotes
fields:
-
handle: footnotes_will_appear_here
field:
display: 'Footnotes will appear here'
type: section
icon: section
listable: hidden
instructions_position: above
id
attribute on the body copy anchor links. This allows visitors to go to footnotes and back again.
<div class="footnotes_set col-span-12 grid lg:grid-cols-2 gap-4 mb-8">
<h2 class="text-xl font-bold border-t border-black links-no-underline" id="footnotes">
<a href="#footnotes" class="anchor font-bold">Footnotes</a>
<h2>
<div class="">
{{ footnotes sort="number" }}
<div class="flex mb-8">
<div class="w-20 inline-flex items-start">
<span>[</span>
<a
id="f{{ number }}"
href="#a{{ number }}"
class="links-no-underline inline-flex items-center"
>
<span class="sr-only">Back to </span>
<span>{{ number }}</span>
<span class="ml-1 text-sm transform rotate-90">↰</span>
</a>
<span>]</span>
</div>
<div class="w-full">{{ body }}</div>
</div>
{{ /footnotes }}
</div>
</div>
Huh @wesort thats a great approach đŸ”¥
It would be super nice to be able to have a proper footnotes feature in Bard.