File tree Expand file tree Collapse file tree 1 file changed +63
-1
lines changed Expand file tree Collapse file tree 1 file changed +63
-1
lines changed Original file line number Diff line number Diff line change 1- # nova-unlayer-field
1+ # Nova Unlayer Field
2+
3+ ⚠️ This package is under active development
4+
5+ <!-- [](https://packagist.org/packages/idf/nova-unlayer-field)-->
6+ <!-- [](https://packagist.org/packages/idf/nova-unlayer-field)-->
7+
8+ Adds a Laravel Nova field for Unlayer to compose emails and landing pages.
9+
10+ ## Installation
11+
12+ You can install the package in to a Laravel app that uses [ Nova] ( https://nova.laravel.com ) via composer:
13+
14+ ``` bash
15+ composer require idf/nova-unlayer-field
16+ ```
17+
18+ ## Usage
19+
20+ ``` php
21+ public function fields()
22+ {
23+ return [
24+ Unlayer::make('Payload Content')->config([
25+ 'projectId' => config('unlayer.project_id'),
26+ 'templateId' => config('unlayer.newsletter_template_id'),
27+ 'displayMode' => 'email',
28+ 'locale' => app()->getLocale(),
29+ ]),
30+ ];
31+ }
32+ ```
33+
34+ ### Options
35+ - ` ->config(array|callable $config) ` : Specify [ Unlayer config] ( https://docs.unlayer.com/docs/getting-started#section-configuration-options ) .
36+ - ` ->savingCallback(?callable $callback) ` : Specify callback on saving a Model. Useful to store HTML result HTML code.
37+ - ` ->height(string $height) ` : Set height of the editor (with units). E.g. '1000px' (800px by default).
38+
39+
40+ ### Changelog
41+
42+ Please see [ Releases] ( https://github.com/InteractionDesignFoundation/nova-unlayer-field/releases ) for more information on what has changed recently.
43+
44+ ## Contributing
45+
46+ Please see [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
47+
48+ ### Compiling Assets
49+
50+ ``` bash
51+ # Compile and minify your assets:
52+ npm run prod
53+
54+ # Compile your assets for local development:
55+ npm run dev
56+
57+ # Run the NPM "watch" command to auto-compile your assets when they are changed:
58+ npm run watch
59+ ```
60+
61+ ## License
62+
63+ The MIT License (MIT). Please see [ License File] ( LICENSE ) for more information.
You can’t perform that action at this time.
0 commit comments