承接 androsamp/filament-rich-editor-highlight 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

androsamp/filament-rich-editor-highlight

最新稳定版本:v1.0.1

Composer 安装命令:

composer require androsamp/filament-rich-editor-highlight

包简介

Filament Rich Editor highlight plugin (TipTap) for FilamentPHP.

README 文档

README

Latest Version on Packagist Total Downloads

A Filament Rich Editor plugin that adds text highlight color selection (<mark data-color="...">) powered by TipTap.

Features

  • Adds the highlightColorPicker tool to the editor toolbar.
  • Opens a modal with a ColorPicker to choose highlight color.
  • Registers a TipTap JS extension with multicolor highlight support.
  • Renders highlighted content correctly through RichContentRenderer.

Requirements

  • PHP ^8.1
  • filament/forms ^4.0|^5.0

Installation

composer require androsamp/filament-rich-editor-highlight

If you are developing the package locally:

cd packages/custom-rich-editor-highlight
npm install
npm run build

Usage

After installation, the package service provider automatically registers the plugin for RichEditor.

To show the button in the UI, include highlightColorPicker in your toolbar configuration:

use Filament\Forms\Components\RichEditor;

RichEditor::make('content')
    ->toolbarButtons([
        'bold',
        'italic',
        'highlightColorPicker',
    ]);

For floatingToolbars:

RichEditor::make('content')
    ->floatingToolbars([
        'paragraph' => [
            'highlightColorPicker',
        ],
    ]);

Content Rendering

The plugin is also automatically registered for RichContentRenderer, so highlighted HTML is rendered correctly:

use Filament\Forms\Components\RichEditor\RichContentRenderer;

$html = RichContentRenderer::make($post->content)->toHtml();

Localization

The package includes translations for the button label and modal heading.

Available keys:

'filament-rich-editor-highlight::highlight.label'
'filament-rich-editor-highlight::highlight.modal_heading'

Publish translations:

php artisan vendor:publish --tag=filament-rich-editor-highlight-translations

Published files path: resources/lang/vendor/filament-rich-editor-highlight.

Build and Assets

After changing the JS part of the plugin:

cd packages/custom-rich-editor-highlight
npm run build

If you need to publish Filament assets:

php artisan filament:assets

License

MIT

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固