定制 jangvel/nova-gutenberg 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jangvel/nova-gutenberg

最新稳定版本:v1.0.2

Composer 安装命令:

composer require jangvel/nova-gutenberg

包简介

Implementation of the Gutenberg editor as a Laravel Nova Field based on Laraberg.

README 文档

README

A nova field for Laraberg

Requirements

  • php: ^8.2
  • laravel/nova: ^4.0
  • laravel/framework: ^8.0|^9.0|^10.0|^11.0|^12.0

Installation

Install via composer

composer require jangvel/nova-gutenberg

Publish Laraberg files

php artisan vendor:publish --provider="VanOns\Laraberg\LarabergServiceProvider"

Laraberg provides a CSS file that should be present on the page you want to render content on:

<link rel="stylesheet" href="{{ asset('vendor/laraberg/css/laraberg.css') }}">

Usage

Simply register the field in your Resource

use Jangvel\NovaGutenberg\NovaGutenberg;

public function fields(Request $request)
{
    return [
        NovaGutenberg::make(__('Content'), 'content'),
    ];
}

Add the RendersContent trait to your model. And optionally define the $contentColumn property to point to the column that holds your Laraberg content, this defaults to content.

use Illuminate\Database\Eloquent\Model;
use VanOns\Laraberg\Traits\RendersContent;

class Post extends Model
{
    use RendersContent;
    
    protected $contentColumn = 'content';
       
    ...
}

Call the render method on your model in a template.

{!! $model->render() !!}

Options

The field has a few options you can configure.

Height

You can customize the height of the editor.

NovaGutenberg::make(__('Content'), 'content')->height(600)

统计信息

  • 总下载量: 3.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固