Open AntoLC opened 6 days ago
Yep, this is one of the things that are indeed lost when converting to HTML. Definitely on the TODO list to fix, though we're not sure yet what makes most sense - I imagine a common use case is for people to statically render BlockNote content by converting to HTML. With that in mind there are 2 options:
Not sure yet what the better option is atm, both have their pros & cons. Do you have a specific use case in mind with blocksToHTMLLossy
? Would be great to hear what you're using it for!
Not sure yet what the better option is atm, both have their pros & cons. Do you have a specific use case in mind with blocksToHTMLLossy? Would be great to hear what you're using it for!
For the moment we use it to generate PDF, it accepts html and css.
css classname could be ok with the alignment (there are not so much properties), but with colors it seems more complicated with classname.
After if blocksToHTMLLossy
could expose the hex in 1 way or another, it would be fine for us, we could on our side create a parser to catch them and use them.
Ex:
<p class="bn-inline-content" data-colors="#0b6e99" data-bg-colors="#d61f1f" ...>
…
</p>
Describe the bug Thank you for your great work.
I noticed the method
blocksToHTMLLossy
doesn't show any information about the alignment, the color or the background of a text. For a text centered and with blue color and red background by example,blocksToHTMLLossy
will returned<p class="bn-inline-content">Text blue</p>
.Nice to have Could be nice to have something like:
Thank you!