定制 abdelhamiderrahmouni/filament-editorjs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

abdelhamiderrahmouni/filament-editorjs

最新稳定版本:v0.1.0

Composer 安装命令:

composer require abdelhamiderrahmouni/filament-editorjs

包简介

Next generation block styled editor.

README 文档

README

Filament EditorJs Latest Version on Packagist Total Downloads

EditorJs integration for Filament Admin/Forms.

Installation

You can install the package via composer:

composer require abdelhamiderrahmouni/filament-editorjs

Usage

use FilamentEditorJs\Forms\Components\EditorJs;

EditorJs::make('content')

Customization

Tools

By default all tools are enabled. This is a list of available tools:

[
    'attaches',         // @editorjs/attaches
    'checklist',        // @editorjs/checklist
    'code',             // @editorjs/code
    'delimiter',        // @editorjs/delimiter
    'header',           // @editorjs/header
    'image-gallery',    // editorjs-gallery
    'image',            // @editorjs/image
    'inline-code',      // @editorjs/inline-code
    'link',             // @editorjs/link
    'list',             // @editorjs/list
    'marker',           // @editorjs/marker
    'nested-list',      // @editorjs/nested-list
    'paragraph',        // @editorjs/paragraph
    'quote',            // @editorjs/quote
    'raw',              // @editorjs/raw
    'style',            // editorjs-style
    'table',            // @editorjs/table
    'underline',        // @editorjs/underline
    'warning',          // @editorjs/warning
]

You can disable any of them using by passing an array of tool names:

EditorJs::make('content')
    ->disableTools(['image', 'raw']);

Also you can enable only certain tools:

EditorJs::make('content')
    ->tools(['image', 'raw']);

Tools Options

You can pass options to the tools:

EditorJs::make('content')
    ->toolsOptions([
        'attaches' => [
            'endpoint' => '/upload/file',
        ],
        'image' => [
            'endpoints' => [
                'byFile' => '/upload/image',
                'byUrl' => '/upload/image-by-url',
            ],
        ],
    ]);

Debugging

To debug the editor, you can enable the debug mode:

EditorJs::make('content')
    ->debug();

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 33
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-16