Markdown Preview

Per the docs here, https://filamentphp.com/docs/3.x/forms/fields/markdown-editor It states:
The markdown editor allows you to edit and preview markdown content, as well as upload images using drag and drop.
The markdown editor allows you to edit and preview markdown content, as well as upload images using drag and drop.
I can't seem to find anyway to enable the 'preview' that it's talking about. Is that not talking about 'live preview' of sorts?
7 Replies
awcodes
awcodes2y ago
Should be a preview button by default, I think. Lol.
Shavik
ShavikOP2y ago
Hmm I didn't see one. Will check again later.
Vladimir
Vladimir2y ago
There is no preview button. And i dont know how to display value of markdown field on blade template. It appears all unformatted.
awcodes
awcodes2y ago
To display it in blade you have to parse it. Html can’t render markdown by default. Laravels string helper has a basic markdown parser on it.
Vladimir
Vladimir2y ago
Yes, actually Laravel helper did not helped much, what it does is to translate it to html markup, however, simple changing class to typography prose fixed presentation layer. However, i think @Chris Reed asked where how to preview markdown content, as pre documentation it says "Edit and PREVIEW markdown content". You mention that you think that button shall be there, alas, it is not 🙂 No preview button on Editor, so maybe its something that we shall implement and not part of editor? Ot perhaps set it it configuration of editor while creating editor instance?
Patrick Boivin
There was definitely a preview tab in v2. It doesn't seem to be there anymore in v3.
Patrick Boivin
Maybe I'll take this opportunity for a shameless plug of my #peek plugin (v3 compatible):

Did you find this page helpful?