Currently if we show the content of a custom column of type comments (in the book preview) we loose all line-breaks and leading whitespaces.
This commit PR parses the display column from the database and adds white-space: pre-wrap, to properly render the content (if interpret_as is either html, long-text or markdown).
For the fourth possible interpret-as value short-text, we keep the current display: inline behavior.
In the future it could be nice to really render the content if interpret_as is html or markdown. (Markdown would be pretty easy, but html would need a proper html sanitizer to prevent XSS)...
Currently if we show the content of a custom column of type
comments
(in the book preview) we loose all line-breaks and leading whitespaces.This commit PR parses the
display
column from the database and addswhite-space: pre-wrap
, to properly render the content (ifinterpret_as
is eitherhtml
,long-text
ormarkdown
).For the fourth possible interpret-as value
short-text
, we keep the currentdisplay: inline
behavior.In the future it could be nice to really render the content if
interpret_as
ishtml
ormarkdown
. (Markdown would be pretty easy, but html would need a proper html sanitizer to prevent XSS)...