Skip to content

Allow adding/editing footnotes in the rich text editor

Closes #11 (closed)

Closes #23 (closed)

  • Address newly introduced TODO comments
  • Sanitise HTML entered into footnote's contentEditable element
  • Test in browsers other than Google Chrome (Firefox and Safari successfully tested)

Known issues:

  • The regular tiptap controls (Bold, italic, underline) don't work in the contenteditable footnote element, thus the content can only be formatted using command+B/command+I in Chrome or Right click › Select font style in Safari
  • In Firefox, the content of the contenteditable footnote element can't be formatted using e.g. command+B (for bold) at all, because this opens one of the standard Firefox windows instead.
  • Underline tags can neither be added to footnote contents nor are they preserved when they are initially being contained in a footnote and this footnote is opened and closed by a user.
  • Because of standard sanitation being applied to contenteditable elements, the check for actual changes to change/agreement requests based on comparing the two HTML strings does not work when any footnotes contain HTML and the user opened and closed this footnote – then, the HTML contains escaped (but still properly rendered) HTML formatting tags for the footnote, which are not 100 % equal to the original unescaped HTML text, which are thus being considered as unequal to the original content. => When the footnote contains any HTML markup, this HTML is escaped and thus not correctly rendered.~~ => ️ fixed
Edited by Bastian König

Merge request reports