assertchris/better-markdown-editor

A better markdown editor than the one that ships with Filament

1.0.3 2024-07-24 14:57 UTC

This package is auto-updated.

Last update: 2024-10-24 15:34:26 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A better markdown editor than the one that ships with Filament.

Installation

You can install the package via composer:

composer require assertchris/better-markdown-editor

You can publish the config file with:

php artisan vendor:publish --tag="better-markdown-editor-config"

Optionally, you can publish the views using

php artisan vendor:publish --tag="better-markdown-editor-views"

This is the contents of the published config file:

return [
];

Usage

use AC\BetterMarkdownEditor\BetterMarkdownEditor;

BetterMarkdownEditor::make('markdown')
    // ...all the methods from the current MarkdownEditor
    // with the addition of some new methods
    ->hasLanguageAssistance(),

Motivation

Why build this?

I wanted to build a writing platform. I love Filament, but none of the fields had the functionality I use other apps for. It started as me wanting to make Filament's MarkdownEditor able to point out needlessly complex sentences and poor wording.

Why not contribute those improvements to Filament?

I tried, but they're understandably hesitant to take on the maintenance burden.

Why is it better?

For a start, it does what Hemingway does; but better.

Here's what I am planning to add in the near future (while procrastinating writing projects):

  • fullscreen mode
  • opt-in LLM-based error correction (with loads of caveats and apprehension)
  • an upgrade to CodeMirror 6

Testing

composer test

License

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