A simple editor.js html parser for Laravel
alaminfirdows/laravel-editorjs is a Laravel package for a simple editor.js html parser for laravel.
It currently has 51 GitHub stars and 22.155 downloads on Packagist (latest version v2.4.0).
Install it with composer require alaminfirdows/laravel-editorjs.
Discover more Laravel packages by alaminfirdows
or browse all Laravel packages to compare alternatives.
Last updated

A simple editor.js html parser for Laravel
You can can play with the demo here
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"
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;
| Laravel Version | Package Version | |---------------------|-----------------| | 10.x, 11.x, 12.x | ✅ 2.x | | 9.x | ✅ 1.1 | | 8.x | ✅ 1.0 |
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.