Skip to content

Commit 8625801

Browse files
committed
Add basic info to README.md
1 parent 34ea5f4 commit 8625801

File tree

1 file changed

+63
-1
lines changed

1 file changed

+63
-1
lines changed

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
# nova-unlayer-field
1+
# Nova Unlayer Field
2+
3+
⚠️ This package is under active development
4+
5+
<!--[![Latest Stable Version](https://poser.pugx.org/idf/nova-unlayer-field/v/stable)](https://packagist.org/packages/idf/nova-unlayer-field)-->
6+
<!--[![Total Downloads](https://poser.pugx.org/idf/nova-unlayer-field/downloads)](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.

0 commit comments

Comments
 (0)