New footnote example

Hi all. I just published a new example—a footnote editor (port of the similar example in ProseMirror). I had to fix a bunch of things to make blocks that behave like atoms work properly, but having fixed the library issues I ran into, the resulting code for the example is pleasingly simple and elegant.

I’ve also tagged a version 0.3.0 with the fixes (and some small features).

If you haven’t seen it yet, also check out the collaborative editing example! (And blog post.)

Hi Marijn,

I tested footnote example on Firefox.

When first footnote is open, clicking on the second footnote displays the content of the first footnote. If I put selection on text and click second footnote, it display correct content.
When navigating between footnotes, it shows the content of first opened footnote.

Thanks for spotting that. I’ve pushed a patch that should resolve this.

This patch may have caused another problem.

I clicked one footnote to display its content. Then I clicked another one but it failed to open.

Console says

Wordgard plugin crashed: TypeError: newFootnote.node.contentEq is not a function

Good point. I used a method I didn’t publish yet, and thus isn’t available in the version of the library the website uses. Should be better now.

It works great.
It is very beneficial to see Prosemirror examples in Wordgard.

1 Like

Indeed. It’s also a great way for me to find out what’s not working yet. There will be more of them.

1 Like