Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-admin-extensions/lodpod-editor
Lodpod print template visual editor LodPod打印模板Web可视化编辑器扩展
https://github.com/laravel-admin-extensions/lodpod-editor
Last synced: about 1 month ago
JSON representation
Lodpod print template visual editor LodPod打印模板Web可视化编辑器扩展
- Host: GitHub
- URL: https://github.com/laravel-admin-extensions/lodpod-editor
- Owner: laravel-admin-extensions
- License: mit
- Created: 2019-07-07T15:11:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-24T07:08:51.000Z (over 5 years ago)
- Last Synced: 2024-11-02T19:34:08.762Z (about 1 month ago)
- Language: JavaScript
- Size: 730 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-laravel-admin - Lodpod-editor - LodPod打印模板Web可视化编辑器扩展 (扩展包 / 字段类扩展包)
README
Lodpod-Editor
======It's a laravel-admin extension, use for lodpod print templates editing.
## Installation
```
$ composer require xiewenfeng/lodpod-editor$ php artisan admin:import lodpod-editor
```
## Usage```
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$form = new Form(new LodpodEditorTemplate);
$form->text('name', __('Name'));
$form->lodpod_editor('data', __('Data'))
->config([ // background width and height setting
'widthField' =>'width',
'heightField' =>'height',
'backgroundField'=>'background'
])
->fields([ // left items
[
'id'=>'sender',
'text'=>trans('admin.lodpod_editor.sender')
],
[
'id'=>'sender_mobile',
'text'=>trans('admin.lodpod_editor.sender_mobile')
],
['id'=>'sender_address',
'text'=>trans('admin.lodpod_editor.sender_address')
],
['id'=>'sender_company',
'text'=>trans('admin.lodpod_editor.sender_company')
],
['id'=>'sender_zip_code',
'text'=>trans('admin.lodpod_editor.sender_zip_code')
],
]);
return $form;
}
```## Demo
![demo](https://github.com/williamtse/lodpod-editor/blob/master/resources/assets/demo.PNG?raw=true "demo")