承接 kraftbit/nova-tinymce5-editor 相关项目开发

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

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

kraftbit/nova-tinymce5-editor

最新稳定版本:v1.0.0

Composer 安装命令:

composer require kraftbit/nova-tinymce5-editor

包简介

A Laravel Nova field.

README 文档

README

Nova TinyMCE 5 Editor is Laravel Nova field that integrates TinyMCE5 WYSIWYG editor.

Installation

Use the composer to install this package.

composer require kraftbit/nova-tinymce5-editor

Usage

Publish config with the following command:

php artisan vendor:publish --provider="Kraftbit\NovaTinymce5Editor\FieldServiceProvider"

Now you have nova-tinymce5-editor.php file in your config folder. Edit TinyMCE options and toolbar here.

Add your TinyMCE cloud API key here or to your .env file like this:

TINYMCE_API_KEY=your-key-here

After that you are good to go! Add NovaTinymce5Editor class and field to your Nova Resource.

use Kraftbit\NovaTinymce5Editor\NovaTinymce5Editor; ... NovaTinymce5Editor::make('Body', 'body'),

Available options

You can pass arguments and TinyMCE options directly from a field to customize your toolbar and plugins, like this:

NovaTinymce5Editor::make('Body')->placeholder('Enter content here') ->options(['toolbar' => ['undo redo | align | link | code'], 'plugins' => ['link code']]),

For available options/plugins visit official TinyMCE 5 documentation.

Integration with Media Library

Nova TinyMCE 5 Editor field works well with Nova Media Library. If you would like to insert images from Media Library directly to editor content, you need to install Nova Media Library field first and add a Media Library JS callback field. To make it work, you need to add custom *id for TinyMCE field ->id('body'), and meta argument ->withMeta(['mediaLibrary' => true]) and then pass the same editor *id to your Media Library callback field. In the example below we use 'body' for *id because that is the column name in our database:

NovaTinymce5Editor::make('Body')->id('body')->withMeta(['mediaLibrary' => true]), MediaLibrary::make('Insert image', 'js_callback_media_library') ->jsCallback('mediaLibrarySelectFiles', ['editor' => 'body'])->types(['Image']),

Screenshots

TinyMCE editor without inserted image Nova TinyMCE 5 Editor

TinyMCE editor with inserted image Nova TinyMCE 5 Editor

Image file options Nova TinyMCE 5 Editor

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固