F
Filamentβ€’17mo ago
GwnMik02

When using ->markdown on TextEntry in a infolist white spaces are not rendering

Components\TextEntry::make('description') ->label('Omschrijving')
->markdown()
->columnSpanFull()
Components\TextEntry::make('description') ->label('Omschrijving')
->markdown()
->columnSpanFull()
The following code is not rendering white spaces in the infolist. Is there a solution for this?
10 Replies
Patrick Boivin
Patrick Boivinβ€’17mo ago
Can you post a screenshot of the rendering issue?
Dennis Koch
Dennis Kochβ€’17mo ago
And the content of the field.
GwnMik02
GwnMik02OPβ€’17mo ago
Yes, one image is the entry here the other the form component. The white spaces are correct in the form component not on the entry. Forms\Components\MarkdownEditor::make('description') ->label('Omschrijving') ->required(), this is the form component.
Dennis Koch
Dennis Kochβ€’17mo ago
What does the HTML look like? I think you are just missing some style. Like a Tailwind prose class
GwnMik02
GwnMik02OPβ€’17mo ago
this is the html it is indeed missing the prose class. When I add it it is adding white spaces to the content. Shouldn't this be default when adding the ->markdown() option?
Dennis Koch
Dennis Kochβ€’17mo ago
@Dan Harrin What do you think about this? ->markdown() on TextEntry should apply prose otherwise the markdown is a bit useless, right?
Dan Harrin
Dan Harrinβ€’17mo ago
sure
Dennis Koch
Dennis Kochβ€’17mo ago
@DitIsMik Wanna create a PR?
GwnMik02
GwnMik02OPβ€’17mo ago
Sure! Will create it this afternoon currently at work πŸ™‚
GwnMik02
GwnMik02OPβ€’17mo ago
GitHub
Added the prose class default on markdown option on a text entry by...
Changes have been thoroughly tested to not break existing functionality. New functionality has been documented or existing documentation has been updated to reflect changes. Visual changes are ex...

Did you find this page helpful?