PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

1.1.0
Table of Contents
Download

The Controller

The controller file 🕹, located inside of app/Http/Livewire/MarkdownX.php, is the controller that handles the back-end logic for the editor. This includes updating the content preview, uploading images, handling GIF searches, and rendering the view.

This file is fairly well documented; however, there is one function that I want to point out. The updateContentPreview() function:

public function updateContentPreview(){
    $this->contentPreview = Str::markdown($this->content);
}

This is using the default Laravel Markdown string helper. Since markdown does not natively support some of the block items like GIPHY or Youtube, we will show you how to render these items when we talk about Liquid Tags. That means that function is the only part of the editor that you will/should edit.

We will elaborate more on the updatedContent() function, when we learn about the Editor Events. But, for now, let's move on to talking about the editor view 🤓.