BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Parsing HTML to Blocks with error in <pre> tag

Open xuliuzhu1834 opened this issue 10 months ago • 1 comments

https://www.blocknotejs.org/examples/interoperability/converting-blocks-from-html

input html

<pre>
  L          TE
    A       A
      C    V
       R A
       DOU
       LOU
      REUSE
      QUE TU
      PORTES
    ET QUI T'
    ORNE O CI
     VILISÉ
    OTE-  TU VEUX
     LA    BIEN
    SI      RESPI
            RER       - Apollinaire
</pre>

output error : Uncaught (in promise) TypeError: Cannot read properties of null (reading 'firstChild')

xuliuzhu1834 avatar Feb 05 '25 12:02 xuliuzhu1834

Thanks for reporting! I was able to reproduce this. However, it's a pretty specific scenario - at the moment we can't prioritize this

YousefED avatar Feb 18 '25 20:02 YousefED

This is correctly handled in the latest versions of blocknote

nperez0111 avatar Sep 19 '25 13:09 nperez0111