承接 alaminfirdows/laravel-editorjs 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

alaminfirdows/laravel-editorjs

最新稳定版本:v2.3.0

Composer 安装命令:

composer require alaminfirdows/laravel-editorjs

包简介

A simple editor.js html parser for Laravel

README 文档

README

image

Laravel-Editor.js

A simple editor.js html parser for Laravel

Latest Version on Packagist Total Downloads

Features

  • Render Editor.js output
  • Custom block rendering

Demo

You can can play with the demo here

Installation

You can install the package via composer:

composer require alaminfirdows/laravel-editorjs

You can publish the config file with:

php artisan vendor:publish --tag="laravel_editorjs-config"

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel_editorjs-views"

Usage

Blade Directive

@editorJsRender($posts->body)

Facade

use App\Models\Post;

$post = Post::find(1);
echo LaravelEditorJs::render($post->body);

Defining An Accessor

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use AlAminFirdows\LaravelEditorJs\Facades\LaravelEditorJs;

class Post extends Model
{
    public function getBodyAttribute()
    {
        return LaravelEditorJs::render($this->attributes['body']);
    }
}

$post = Post::find(1);
echo $post->body;

Versioning

Laravel Version Package Version
10.x, 11.x, 12.x ✅ 2.x
9.x ✅ 1.1
8.x ✅ 1.0

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 51
  • Watchers: 5
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-21