GPT Trix Editor
CommunityA Trix editor field with OpenAI GPT features.
Author:
Asker Akbar
Package health
BetaAutomated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Failed: Dependabot PR responsiveness — Stale Dependabot PRs: oldest general PR is 679 days old. View details on Plumb
- Skipped: Renovate MR responsiveness
- Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
- Skipped: Dependency update cooldown configured
- Failed: Provides a security policy — View details on Plumb
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Failed: Commit and release recency — Inactive: last commit 656 days ago; last release 693 days ago. View details on Plumb
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Failed:
Current Laravel version supported
—
The newest Laravel line the package co-installs with is
11.0, which is end-of-life. View details on Plumb -
Passed:
Current PHP version supported
—
Constraint
^8.0supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- New - Call ChatGPT API on selected/highlighted text 👇
- Installation
- Quick Start
- To do
- Contribute / Report a bug / Security Vulnerabilities
- License
The GPT Trix Editor is a form field component for the Filament PHP framework that enhances the Trix editor with OpenAI GPT features.
Features:
#New - Call ChatGPT API on selected/highlighted text 👇
#Installation
You can install the package via composer:
composer require askerakbar/gpt-trix-editor
#Quick Start
- Publish the configuration files by running the following commands:
php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"
php artisan vendor:publish --tag="gpt-trix-editor-config"
php artisan vendor:publish --tag="gpt-trix-editor-translations"
- We're using https://github.com/openai-php/laravel laravel package to call the OpenAI APIs, so you need to set your OpenAI API key in the .env file or in the config/openapi.php file:
OPENAI_API_KEY=YOUR_KEY
You can also set the GPT model in the .env
TRIX_GPT_MODEL=YOUR_MODEL
- Optionally, you can customize the configuration file at config/gpt-trix-editor.php. This includes adding more prompts to the menu dropdown, setting temperature and max_tokens.
- Clear the configuration cache to make sure your changes take effect:
php artisan config:clear - Done!
Import the field component:
use AskerAkbar\GptTrixEditor\Components\GptTrixEditor;
You can use the GPT Trix Editor field component like any other field component:
GptTrixEditor::make('content')->columnSpan('full');
By default, the GPT Toolbar Button is enabled in the GP Trix Editor. However, if you want to disable it, you can do so like this:
GptTrixEditor::make('content')->disableToolbarButtons([
'gptTools',
])->columnSpan('full');
#To do
- ✅ Run the GPT actions on selected/highlighted text
#Contribute / Report a bug / Security Vulnerabilities
If you would like to contriubte, please feel free to submit pull requests or open issues.
#License
The MIT License (MIT). Please see License File for more information.
The author
From the same author
Featured Plugins
A selection of plugins curated by the Filament team
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Data Lens
Advanced Data Visualization for Laravel Filament - a premium reporting solution enabling custom column creation, sophisticated filtering, and enterprise-grade data insights within admin panels.
Padmission