Download the PHP package ardenthq/nova-enhanced-markdown without Composer
On this page you can find all versions of the php package ardenthq/nova-enhanced-markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ardenthq/nova-enhanced-markdown
More information about ardenthq/nova-enhanced-markdown
Files in ardenthq/nova-enhanced-markdown
Package nova-enhanced-markdown
Short Description Custom Markdown Field for Nova with image upload support
License MIT
Informations about the package nova-enhanced-markdown
Laravel Nova Enhanced Markdown Field
A custom Markdown Field for Nova with image upload support
Features
- For Laravel Nova ^4.0
- Image upload
- Accepts Drag & Drop / Copy & Paste
Installation
Use
-
Add the
EnhancedMarkdown
field to your Nova Resource. -
By default, this package only validates the attachment as an actual file. If you require more rules (let's say that you only want to accept images), define the rules with the new
attachmentRules
method. - In some cases, you may want to parse the file before storing it (for example, apply some optimizations). To do that, you can add a callback by using the
parseFile
method.
If needed, you can also return a new instance of the file, that instance is the one that is going to be stored.
Important: You need to return an instance of Illuminate\Http\UploadedFile
, Illuminate\Http\File
or a string
.
- The files are stored by default with
/
as a path and usingpublic
storage disk. You can change the path and the storage disk with thedisk
andpath
methods:
Development
- Run
yarn nova:install
andyarn install
to install all the necessary dependencies for compiling the view components. - Run
yarn run dev
(oryarn run watch
) while making changes to the components in your local environment. - If you change the vue components, ensure to compile for production before making a PR.
Compile for production
- Run
yarn nova:install
andyarn install
to install all the necessary dependencies for compiling the view components. - Run
yarn run production
.
Analyze the code with phpstan
Refactor the code with php rector
Format the code with php-cs-fixer
Run tests
Security
If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
Credits
This project exists thanks to all the people who contribute.
License
Ardent
All versions of nova-enhanced-markdown with dependencies
laravel/framework Version ^9.0|^10.0
spatie/image Version ^2.2
spatie/image-optimizer Version ^1.6