Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alaminfirdows/laravel-editorjs
A simple editor.js html parser for Laravel
https://github.com/alaminfirdows/laravel-editorjs
editor editorjs editorjs-tool eloquent hacktoberfest laravel laravel-package parser
Last synced: 5 days ago
JSON representation
A simple editor.js html parser for Laravel
- Host: GitHub
- URL: https://github.com/alaminfirdows/laravel-editorjs
- Owner: alaminfirdows
- License: mit
- Created: 2021-09-21T05:37:49.000Z (over 3 years ago)
- Default Branch: 2.x
- Last Pushed: 2024-10-22T06:40:41.000Z (3 months ago)
- Last Synced: 2025-01-08T14:28:46.209Z (12 days ago)
- Topics: editor, editorjs, editorjs-tool, eloquent, hacktoberfest, laravel, laravel-package, parser
- Language: PHP
- Homepage: https://packagist.org/packages/alaminfirdows/laravel-editorjs
- Size: 47.9 KB
- Stars: 37
- Watchers: 5
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
![image](https://user-images.githubusercontent.com/30468274/162574530-f9af87ef-79d4-41de-8ddb-9ebf60563ac9.png)
# Laravel-Editor.js
A simple editor.js html parser for Laravel
[![Latest Version on Packagist](https://img.shields.io/packagist/v/alaminfirdows/laravel-editorjs.svg?style=for-the-badge)](https://packagist.org/packages/alaminfirdows/laravel-editorjs)
[![Total Downloads](https://img.shields.io/packagist/dt/alaminfirdows/laravel-editorjs.svg?style=for-the-badge)](https://packagist.org/packages/alaminfirdows/laravel-editorjs)## Features
- Render Editor.js output
- Custom block rendering## Demo
You can can play with the demo [here](https://github.com/alaminfirdows/laravel-editorjs-demo)## Installation
You can install the package via composer:
```bash
composer require alaminfirdows/laravel-editorjs
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel_editorjs-config"
```Optionally, you can publish the views using
```bash
php artisan vendor:publish --tag="laravel_editorjs-views"
```## Usage
```php
use App\Models\Post;$post = Post::find(1);
echo LaravelEditorJs::render($post->body);
```Defining An Accessor
```php
attributes['body']);
}
}$post = Post::find(1);
echo $post->body;
```## Versioning
| Laravel | Supported |
| ---------- | --------- |
| 10.x, 11.x | ✅ 2.x |
| 9.x | ✅ 1.1 |
| 8.x | ✅ 1.0 |## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Al-Amin Firdows](https://github.com/alaminfirdows)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.