LaravelPackages.net
Acme Inc.
Toggle sidebar
p1613m/laravel-editorjs

A simple editor.js html parser for Laravel

578
0
v1.0.3
About p1613m/laravel-editorjs

p1613m/laravel-editorjs is a Laravel package for a simple editor.js html parser for laravel. It currently has 0 GitHub stars and 578 downloads on Packagist (latest version v1.0.3). Install it with composer require p1613m/laravel-editorjs. Discover more Laravel packages by p1613m or browse all Laravel packages to compare alternatives.

Last updated

image

Laravel-Editor.js

A simple editor.js html parser for Laravel

Latest Version on Packagist Total Downloads


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

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 | Supported | | ------- | --------- | | 10.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.

Comments