Download the PHP package codeldev/livewire-markdown-editor without Composer

On this page you can find all versions of the php package codeldev/livewire-markdown-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package livewire-markdown-editor

Livewire Markdown Editor

Latest Version on Packagist GitHub Pest Test Action Status GitHub PHP Stan Action Status Total Downloads

A clean, simple to use markdown editor that you can drop into any other livewire component.

Pest Tests: 100% Code Coverage | PHP Stan: Level Max

⚠️ IN ACTIVE DEVELOPMENT. USE AT YOUR OWN RISK ⚠️


Table of Contents


Features Overview

The Codel Markdown Editor comes with a rich set of features:

Installation

This package has been built for Laravel version 12+ on PHP 8.4 and requires the following dependencies:

Install the package via composer:

Install the Tailwind Typography plugin (required for preview styling):

Configure Tailwind to include the package styles.

Choose one of the following methods

Option A: Tailwind 4+ (CSS-based configuration)

Add to your file:

Option B: Traditional config file approach

Update your :

Config File

If required, you may publish the config file with:

This is the contents of the published config file:

Environment Variables

The following env variables are available to configure the editor using your env file.


Translations

You can publish (optional) the translations file with:

Usage

Set the Dispatcher

This is the event name the editor dispatches to when updating markdown content and passing the updates to your parent component.

Set Initial Value

Initialize the editor with current markdown content, e.g., when updating a post:

Set Up Your Parent Component

In your parent Livewire component, add the following to receive the editor updates:

Example:

Multiple Editor component configuration

Multiple markdown editors can be added to a single page / form. Each should have its own unique key and dispatcher. As an Example:


Using the Editor

Slash Commands

Press / in the editor to open the command menu. Available commands:

Example usage:

  1. Type / to open the command menu
  2. Use arrow keys to navigate or click on a command
  3. Press Enter to select a command

Keyboard Shortcuts

Action Shortcut
Open command menu /
Navigate command menu Arrow keys
Select command Enter
Close command/popover Escape
Show command hint Enter (on new line)

Image Uploads

The editor supports image uploads with the following specifications:

Images are processed internally by the editor component using the class defined in the config file:

If required, you may use your own custom implementation for uploading images

YouTube Embedding

To embed a YouTube video:

  1. Press / to open the command menu
  2. Select the YouTube option
  3. Paste a valid YouTube URL (youtube.com or youtu.be)
  4. Press Insert

Html Previews

Html for the preview uses the Spatie laravel-markdown package. Please review the readme of this package for available options to configure this package. By default, the editor uses:

Extensions:

Commonmark options

Any config options you set for the laravel-markdown package (either directly in the published config file OR your env file), will be merged with the options above.

If required, you may use your own custom implementation for converting markdown to html.


Advanced Configuration

You can customize the editor with additional parameters:

The editor uses a unique key to identify instances when multiple editors are used on the same page.


Component Architecture

The markdown editor is composed of several components:

The editor uses Alpine.js for frontend interactivity and Livewire for backend communication.

If you wish to customize the component files, publish them with:


Custom Implementations

The editor has been built with default Image processing and Preview HTML rendering. However, if you wish to use your own custom processing and rendering classes you may do so.

Custom upload action implementation

Custom html preview action implementation

Troubleshooting

Common Issues

Issue: Editor doesn't update the parent component Solution: Ensure the dispatcher name matches the #[On()] attribute in your parent component

Issue: Editor appears empty after initialization Solution: Make sure you're passing the markdown content correctly:


Testing


Changelog

Please see CHANGELOG for more information on what has changed recently.


Security Vulnerabilities

Please review security policy on how to report security vulnerabilities.


Credits


License

The MIT License (MIT). Please see License File for more information.


All versions of livewire-markdown-editor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version *
livewire/livewire Version ^3.6.3
spatie/laravel-markdown Version ^2.7.1
spatie/laravel-package-tools Version ^1.92.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codeldev/livewire-markdown-editor contains the following files

Loading the files please wait ....