Download the PHP package dive-be/nova-froala-field without Composer

On this page you can find all versions of the php package dive-be/nova-froala-field. 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 nova-froala-field

Froala WYSIWYG Editor field for Laravel Nova

Introduction

This is a fork of the original froala/nova-froala-field repository. This minimalistic version will be maintained indefinitely until all of our projects are migrated off Froala.

Installation

You can install the package into a Laravel application that uses Nova via composer:

Usage

Just use the Froala\Nova\Froala field in your Nova resource:

Override Config Values

To change any of config values for froala field, publish a config file:

Customize Editor Options

For changing any Available Froala Option edit froala.options value:

If you want to set options only to specific field, just pass them to options method:

Attachments

Note If you are not going to use Froala's attachment functionality, you should call the Froala::ignoreMigrations method in the register method of your application's App\Providers\AppServiceProvider class.

Nova Froala Field provides native attachments driver which works similar to Trix File Uploads, but with ability to optimize images.

Run migrations:

Attachments Usage

To allow users to upload images, files and videos, just like with Trix field, chain the withFiles method onto the field's definition. When calling the withFiles method, you should pass the name of the filesystem disk that photos should be stored on:

And also, in your app/Console/Kernel.php file, you should register a daily job to prune any stale attachments from the pending attachments table and storage:

Images Optimization

Note Don't forget to check out spatie/image-optimizer's documentation e.g. to install the required binaries on your machine.

All uploaded images will be optimized by default by spatie/image-optimizer. You can disable image optimization in config file (not recommended):

Upload Max Filesize

You can set max upload filesize for attachments. If set to null, max upload filesize equals to php.ini upload_max_filesize directive value.

Display Edited Content

According to Froala Display Edited Content documentation you should publish Froala styles:

include into view where an edited content is shown:

Also, you should make sure that you put the edited content inside an element that has the .fr-view class:

Show on Index Page

You have an ability to show field content on resource index page in popup window:

Just click Show Content

License Key

To setup your license key, set FROALA_KEY environment variable:

Advanced

Custom Event Handlers

If you want to setup custom event handlers for froala editor instance, create js file and assign events property to window.froala:

to all callbacks provided in window.froala.events, the context of VueJS form field component is automatically applied, you can work with this inside callbacks like with Vue instance component.

After that, load the js file into Nova scripts in NovaServiceProvider::boot method:

Customize Attachment Handlers

You can change any of attachment handlers by passing a callable:

Development

You may get started with this package as follows (after cloning the repository):

Fixing code-style

PHP

JS

Testing

Building dev assets

Building production assets

Contributing

To contribute, simply make a pull request to this repository with your changes. Make sure they are documented well in your pull request description.

Credits

License

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


All versions of nova-froala-field with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3
laravel/nova Version ^4.12
league/flysystem Version ^3.0
nova-kit/nova-packages-tool Version ^1.11
spatie/image-optimizer Version ^1.7
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 dive-be/nova-froala-field contains the following files

Loading the files please wait ....