From 3b203d59c9c91540ff9c1946f5f92f37303fa13f Mon Sep 17 00:00:00 2001 From: Artem Stepanenko <31134245+stepanenko3@users.noreply.github.com> Date: Tue, 17 May 2022 09:24:29 +0300 Subject: [PATCH] Update README.md --- README.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 27bac6d..87fbd1d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Markdown Field for Laravel Nova +# Nova Markdown [![Latest Version on Packagist](https://img.shields.io/packagist/v/stepanenko3/nova-markdown.svg?style=flat-square)](https://packagist.org/packages/stepanenko3/nova-markdown) [![Total Downloads](https://img.shields.io/packagist/dt/stepanenko3/nova-markdown.svg?style=flat-square)](https://packagist.org/packages/stepanenko3/nova-markdown) @@ -8,10 +8,87 @@ ## Description +Extended Markdown Field for Laravel Nova based on native Nova field + +## Features + +- Many toolbar actions +- Status bar +- Toolbar actions toggable +- Customizable toolbar and status bar +- Dark mode +- Responsive +- Full screen +- Preview + +## Requirements + +- `php: >=8.0` +- `laravel/nova: ^4.0` + ## Installation +```bash +# Install the package +composer require stepanenko3/nova-markdown +``` + +Publish the config file: + +``` bash +php artisan vendor:publish --provider="Stepanenko3\NovaMarkdown\FieldServiceProvider" --tag="config" +``` + ## Usage +Add the use declaration to your resource and use the fields: + +```php +use Stepanenko3\NovaMarkdown\Markdown; +... + +Markdown::make('Excerpt', 'excerpt') + ->rules('required', 'max:1000') + ->alwaysShow(), +``` + +## Configuration + +All the configuration is managed from a single configuration file located in `config/nova-markdown.php` + +You can change the presence and order of the toolbar actions from the list + +```php +[ + 'h1', + 'h2', + 'h3', + // 'headingSmaller', + // 'headingBigger', + 'bold', + 'italic', + 'strikethrough', + 'quote', + 'unorderedList', + 'orderedList', + 'link', + 'image', + 'table', + // 'horizontalRule', + 'code', +] +``` + +And status bar + +```php +[ + 'lines', // Show number of lines + 'words', // Show number of words + 'cursor', // Current cursor position line:word +] +``` + ## Screenshots ![screenshot of field](screenshots/field-dark.png)