PHPackages                             paulvl/nv-mrkdwn - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. paulvl/nv-mrkdwn

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

paulvl/nv-mrkdwn
================

A Laravel Nova Markdown Field.

v1.0(5y ago)09MITPHPPHP &gt;=7.4

Since Mar 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/paulvl/nv-mrkdwn)[ Packagist](https://packagist.org/packages/paulvl/nv-mrkdwn)[ Docs](https://github.com/dinandmentink/nova-markdown)[ RSS](/packages/paulvl-nv-mrkdwn/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![Nova Markdown](images/banner.svg)](images/banner.svg)

Nova Markdown
=============

[](#nova-markdown)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2d5173de2c74b3849586575da4034c307f28c2bf4df4bc095127317ee0b49865/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dinandmentink/nova-markdown)[![Total Downloads](https://camo.githubusercontent.com/f64fd55ef9b2bad0303e03bfb872c93103d804846511742b4a33095fc5a51955/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dinandmentink/nova-markdown)[![Forks](https://camo.githubusercontent.com/b44b2ede176043c0a3a212db2d9eef3312a74bff9c19572f39ae9a57575eac0b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/b44b2ede176043c0a3a212db2d9eef3312a74bff9c19572f39ae9a57575eac0b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)[![Stars](https://camo.githubusercontent.com/ea1d32cfaa593ea57637f9e66977723fc7603a869a388b36b67a1563a9170e47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ea1d32cfaa593ea57637f9e66977723fc7603a869a388b36b67a1563a9170e47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)[![MIT license](https://camo.githubusercontent.com/37d70ed2dde8b585ba568a3727dc0d2672812dbac284e8158e794c5e05ddd130/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/37d70ed2dde8b585ba568a3727dc0d2672812dbac284e8158e794c5e05ddd130/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64696e616e646d656e74696e6b2f6e6f76612d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)[![Donate](https://camo.githubusercontent.com/0db0977539488cee3b5c7fe4a05ea531f97c3beb456287f338a24cf5741828d6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://paypal.me/dinandmentink)

Add a markdown editor field to Laravel Nova. Based on [easymde](https://easymde.tk), Nova Markdown supports highlighting, some useful buttons and inline image uploads. It's simple, configurable, and it just works™.

[![Nova Markdown](images/nova-markdown.gif)](images/nova-markdown.gif)

Installation instructions
-------------------------

[](#installation-instructions)

Require `dinandmentink/nova-markdown` using composer:

```
composer require dinandmentink/nova-markdown
```

The package will register itself using Laravels' package autodiscovery. Now, whenever you want to use a Markdown field use `Markdown::make` like you would expect in the `fields()` method of a Nova resource.

```
use DinandMentink\Markdown\Markdown;

public function fields(Request $request)
{
    return [
        Markdown::make("Field Name"),
    ];
}
```

It will accept all default Nova options:

```
use DinandMentink\Markdown\Markdown;

public function fields(Request $request)
{
    return [
        Markdown::make("Content")->rules('required')->hideFromIndex(),
    ];
}
```

Image uploads
-------------

[](#image-uploads)

Nova Markdown supports inline image uploads. To upload an image you can drag-and-drop it onto the markdown editor. Alternatively, pasting an image from your clipboard will also work.

Image upload is enabled by default for all `Markdown` fields. It can be disabled entirely, or by default, through the config. Image upload can be enabled or disabled on a per-field basis, but this will *only* toggle the frontend implementation of image uploads.

```
use DinandMentink\Markdown\Markdown;

public function fields(Request $request)
{
    return [
        Markdown::make("Field With Uploads")->uploads(),
        Markdown::make("Field Without Uploads")->uploads(false),
    ];
}
```

Image upload should just work™. Nova Markdown aims to support image uploads on a vanilla laravel + nova project. The following assumptions must be met. It's possible to override most of these through the config.

- A disk named `public` is assumed to be configured in `filesystems.php`.
- Nova Markdown uses [spatie/image](https://github.com/spatie/image) for compressing and resizing images. Image requires the php [exif extension](http://php.net/manual/en/exif.installation.php) to be enabled.
- Nova Markdown registers a route and a controller in the same middleware configured in `nova.middleware`. This assumes an authenticated user that may access Nova may also upload images through Nova Markdown's image upload route.

Config
------

[](#config)

Config mainly deals with image uploads. Sensible defaults are provided, but Nova Markdown aims to be fully configurable either through `config/nova-markdown.php` or env variables.

For all configuration options please see the [default config](src/config/nova-markdown.php), which can be published:

```
php artisan vendor:publish --provider="DinandMentink\Markdown\FieldServiceProvider"
```

This will create a `config/nova-markdown.php` file in your app that you can modify to set your configuration. Please make sure you check for changes to the original config file in this package between releases. The following are some of the most usefull config items.

**Enable uploads**

Config key: `uploads`
ENV: `NOVA_MARKDOWN_UPLOADS`
Default: `true`

Setting this to `false` will disable image uploads completely.

**Enable uploads by default**

Config key: `uploads-default-enabled`
ENV: `NOVA_MARKDOWN_UPLOADS_DEFAULT_ENABLED`
Default: `true`

Will enable uploads by default (to be enabled on a per-field basis). Has no effect when uploads are disabled entirely.

**Set disk**

Config key: `disk`
ENV: `NOVA_MARKDOWN_DISK`
Default: `public`

Set the disk where uploads are stored. Must be configured in `filesystems.php`.

**Directory**

Config key: `directory`
ENV: `NOVA_MARKDOWN_DIRECTORY`
Default: `uploads`

Set the directory where images are uploaded. Alternatively, it's possible to configure a function, which takes the uploading $user as argument and can be used to group files by user. Example:

```
function($user) {
    return "uploads/" . \Str::slug($user->name);
}
```

**Maximum upload size**

Config key: `max-size`
ENV: `NOVA_MARKDOWN_MAX_SIZE`
Default: `8 * 1024`

The maximum size for uploaded images in kilobytes.

**Maximum upload size**

Config key: `max-width`
ENV: `NOVA_MARKDOWN_MAX_WIDTH`
Default: `1920`

The maximum width for uploaded images in pixels. Uploaded images will be scaled down to this width. Use null to disable image scaling.

**Image Quality**

Config key: `quality`
ENV: `NOVA_MARKDOWN_QUALITY`
Default: `85`

Uploaded images will be converted to this quality. Integer between 0 and 100. Use null to disable quality adjustments.

**Random Filename**

Config key: `random_filename`
ENV: `NOVA_MARKDOWN_RANDOM_FILENAME`
Default: `false`

Uploaded images will be stored by default using a slug version of its original filename. You can set this to true to use a random filename instead.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

[![Dcreative Open Source](images/dcreative-open-source.svg)](images/dcreative-open-source.svg)

This project is proudly created and maintained by [Dcreative](https://www.dcreative.nl). Dcreative is a tiny webdevelopmment agency in the Netherlands.

I have benefited a lot from PHP, Laravel, and countless other open source projects. Nova Markdown is my small contribution in return. Has Nova Markdown been useful to you? Feel free to drop me a [thank-you note](mailto:dinand@dcreative.nl) or [donate a beer](https://paypal.me/dinandmentink). Regardless, I'm happy to provide Nova Markdown.

Contributors:

- [Dinand Mentink](https://github.com/dinandmentink)
- First version based on [@palauaandsons](https://github.com/palauaandsons/nova-simplemde-field/)

Rendering markdown
------------------

[](#rendering-markdown)

Nova Markdown will add a markdown editor field to Nova. It does not render markdown outside Nova. For rendering the markdown in Laravel views I recommend having a look at [Laravel Markdown](https://github.com/GrahamCampbell/Laravel-Markdown) or [commonmark](https://github.com/thephpleague/commonmark).

Difference with Nova's own markdown
-----------------------------------

[](#difference-with-novas-own-markdown)

Nova, ofcourse, offers it's own [markdown field](https://nova.laravel.com/docs/1.0/resources/fields.html#markdown-field). Nova's official markdown and this, Nova Markdown, are similar. Both of them offer inline text highlighting of markdown text. Neither of them perform transformations on the input and simply store it as plain text, usually in a TEXT column.

This package however will add some more highlighting and toolbar buttons that are not included the default Markdown field. But mainly, **Nova Markdown handles image uploads**.

FunctionalityDefault MarkdownNova MarkdownStrongVVItalicVVExternal imageVVLinkVVPreviewVVInline image upload-VHeadings-VBlockquotes-VOrdered lists-VUnordered lists-VSide-by-side view-VTodo
----

[](#todo)

- Write tests

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fdef0e996f65b82fd2c344429cd17177695635620eb34908c87dfbccd062fe0?d=identicon)[paulvl](/maintainers/paulvl)

---

Top Contributors

[![dinandmentink](https://avatars.githubusercontent.com/u/17289887?v=4)](https://github.com/dinandmentink "dinandmentink (77 commits)")

---

Tags

laravelmarkdownfieldnovaImage upload

### Embed Badge

![Health badge](/badges/paulvl-nv-mrkdwn/health.svg)

```
[![Health](https://phpackages.com/badges/paulvl-nv-mrkdwn/health.svg)](https://phpackages.com/packages/paulvl-nv-mrkdwn)
```

###  Alternatives

[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[interaction-design-foundation/nova-html-card

A Laravel Nova card to display arbitrary HTML content

67731.2k3](/packages/interaction-design-foundation-nova-html-card)[stepanenko3/nova-json

Nova json field to spread a json column throughout multiple fields.

42249.7k](/packages/stepanenko3-nova-json)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
