https://github.com/AlexSabur/orchid-editorjs-field
https://github.com/AlexSabur/orchid-editorjs-field
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/AlexSabur/orchid-editorjs-field
- Owner: AlexSabur
- License: mit
- Created: 2020-05-28T08:30:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T13:38:40.000Z (about 2 years ago)
- Last Synced: 2025-04-30T15:33:41.130Z (6 months ago)
- Language: PHP
- Size: 938 KB
- Stars: 13
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-editorjs - orchid-editorjs-field
README
# Orchid Editorjs Field
[](https://github.com/AlexSabur/orchid-editorjs-field/actions)
[](https://styleci.io/repos/188413486)
[](https://packagist.org/packages/AlexSabur/orchid-editorjs-field)
[](https://packagist.org/packages/AlexSabur/orchid-editorjs-field)
[](https://packagist.org/packages/AlexSabur/orchid-editorjs-field)
Package description: Work in process
## Installation
Install via composer
```bash
composer require alexsabur/orchid-editorjs-field
```
## Usage
```php
/**
* Views.
*
* @return Layout[]
*/
public function layout(): array
{
return [
Layout::rows([
EditorJS::make('mydata')->tools([
MarkerTool::make('marker'),
ImageTool::make('picture')
HeaderTool::make('header')
])
]),
];
}
```
### Register new tool
```bash
php artisan orchid:editorjs:tool MySuperTool
```
And in js
```js
class MySuperTool {
//code
}
window.editorJSTools = window.editorJSTools || [];
window.editorJSTools['MySuperTool'] = MySuperTool;
```
## Security
If you discover any security related issues, please email alexsabur@live.ru
instead of using the issue tracker.
## Credits
- [Alex](https://github.com/AlexSabur/orchid-editorjs-field)
- [All contributors](https://github.com/AlexSabur/orchid-editorjs-field/graphs/contributors)
This package is bootstrapped with the help of
[melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).