Markdown Preview
Per the docs here, https://filamentphp.com/docs/3.x/forms/fields/markdown-editor
It states:
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
Should be a preview button by default, I think. Lol.
Hmm I didn't see one. Will check again later.
There is no preview button. And i dont know how to display value of markdown field on blade template. It appears all unformatted.
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.
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?
There was definitely a preview tab in v2. It doesn't seem to be there anymore in v3.
Maybe I'll take this opportunity for a shameless plug of my #peek plugin (v3 compatible):