1.1.0
Table of Contents
Download

MarkdownX FAQ

General

  • Is Laravel MarkdownX open source?

Nope. Currently it’s not.

  • How much is MarkdownX cost?

A pro subscription at DevDojo is required at least for a month ($15) to download it.

  • How to update MarkdownX version?

As long as your pro subscription is active on MarkdownX, you can download the latest version here markdownx.

  • Is there any public Roadmap?

Yes, visit DevDojo Notion Page.

Usage

  • How to install Laravel MarkdownX?

Refer to documentation here or the video here.

  • How to save my markdown content?

MarkdownX is just a textarea. As long as you have the name for this input form, then we can submit it to backend just like we normally would in Laravel.

  1. make sure to give a name for your editor
@livewire('markdown-x', ['name' => 'body')

//or equivalent

<livewire:markdown-x name="body" />
  1. In controller,
dd($request->body); 
  • How to display multiple MarkdownX on one page?

Add a ‘key’ attribute to the component. The reason is, Livewire need same component to have a different key to differentiate it.

@livewire('markdown-x', ['name' => 'body', 'key' => 'a-unique-key'])
@livewire('markdown-x', ['name' => 'snippet', 'key' => 'a-unique-key2'])
  • How to display my old content when validation not passed?
@livewire('markdown-x', [
	'key' => "body", 
	"name" => "body",
	"content" => old("subject") ?? "",
])
  • How to display the rendered markdown content in blade?

We can use standard Str::markdown from Laravel.

{!! Str::markdown($yourModel->column) !!}
  • How to change the style of MarkdownX?

We can change the style with ‘:style’ attribute. For example

<livewire:markdown-x :style="[
    'toolbar' => 'flex items-center justify-between bg-gray-300',
    'textarea' => 'w-full h-full border-2 border-gray-200 focus:border-gray-200 focus:outline-none p-4',
    'height' => 'h-64',
    'preview' => 'bg-gray-200 p-10',
    'help' => 'bg-gray-300 p-8 prose max-w-none'
]"/>