Markdown
class Markdown
Properties
| protected string | $theme | The current theme being used when generating emails. |
|
| protected array | $componentPaths | The registered component paths. |
|
| static protected bool | $withSecuredEncoding | Indicates if secure encoding should be enabled. |
|
| static protected ExtensionInterface>> | $extensions | The registered CommonMark extensions. |
Methods
Render the Markdown template into HTML.
Render the Markdown template into text.
Get a Markdown converter instance.
Get the HTML component paths.
Get the text component paths.
Clone the view factory with render-local mail component paths.
Get the component paths.
Register new mail component paths.
Get the theme currently being used by the renderer.
Enable secured encoding when parsing Markdown.
Disable secured encoding when parsing Markdown.
Flush all static state.
Details
at line 46
__construct(Factory $view, array $options = [])
Create a new Markdown renderer instance.
at line 59
HtmlString
render(string $view, array $data = [], mixed $inliner = null, string|null $theme = null)
Render the Markdown template into HTML.
at line 111
HtmlString
renderText(string $view, array $data = [])
Render the Markdown template into text.
at line 125
static HtmlString
parse(Stringable|string $text, bool $encoded = false)
Parse the given Markdown text into HTML.
at line 155
static MarkdownConverter
converter(array $config = [])
| internal |
Get a Markdown converter instance.
at line 174
array
htmlComponentPaths()
Get the HTML component paths.
at line 184
array
textComponentPaths()
Get the text component paths.
at line 194
protected Factory
viewFactoryWithMailNamespace(array $paths)
Clone the view factory with render-local mail component paths.
at line 208
protected array
componentPaths()
Get the component paths.
at line 221
void
loadComponentsFrom(array $paths = [])
Register new mail component paths.
Boot-only. Mutates the shared Markdown renderer's component paths; use scoped view namespaces for per-render component path changes.
at line 232
Markdown
theme(string $theme)
Set the default theme to be used.
Boot-only. Mutates the shared Markdown renderer's default theme; pass a per-render theme to render() for message-specific themes.
at line 242
string
getTheme()
Get the theme currently being used by the renderer.
at line 253
static void
withSecuredEncoding()
Enable secured encoding when parsing Markdown.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every subsequent Markdown render across all coroutines.
at line 264
static void
withoutSecuredEncoding()
Disable secured encoding when parsing Markdown.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every subsequent Markdown render across all coroutines.
at line 272
static void
flushState()
Flush all static state.