UCL / frrant

2 stars 0 forks source link

Fixing paste behaviour into text editor #425

Closed acholyn closed 7 months ago

acholyn commented 7 months ago

closes #423

The text editor was interpreting something (probably a carriage return) as a <br> which then got turned into a <h4><br></h4> and trigger the footnote area to be made with no content aside from the <hr>. This proved difficult to remove unless you knew where the element was but regardless, this behaviour wasn't expected. This can be bypassed on some browsers with the "force paste" option The solution listens for a paste event and on paste removes the h4 br element inserted. This seems to work across browsers in my testing and doesn't seem to interfere with preexisting footnotes.