If a record was created using LongTextInput it can contain multiline plain text (no HTML).
In the show view I find no satisfactory way to show this multiline plain text.
TextField uses Typography and it looks like it doesn't support multiline, so if I'm not mistaken we can either create another component or change the TextField implementation.
Confirmed. We need a LongTextField which would display its content inside a <pre> tag. This can probably be achieved using the component prop of the
Typography component
Temporarily, I used the component attribute.
https://github.com/marmelab/react-admin/blob/e564864ab02de1395386b618e61272006e85e0c3/packages/ra-ui-materialui/src/field/TextField.js#L11-L20
As the TextField component passes all its props to the underlying Typography, you can achieve this with:
<TextField component="pre" />.
LongTextInput is deprecated as the same logic applies (you can pass a multiline prop), so we won't add a new field either
Most helpful comment
Confirmed. We need a
LongTextFieldwhich would display its content inside a<pre>tag. This can probably be achieved using thecomponentprop of theTypographycomponent