mantix/livewire-jodit-text-editor
Composer 安装命令:
composer require mantix/livewire-jodit-text-editor
包简介
A powerful Livewire rich text editor (WYSIWYG) component built top of Jodit Editor.
README 文档
README
📋 Table of Contents
- Introduction
- Installation
- Basic Usage
- Advanced Features
- Customization
- Changelog
- Contributing
- Support
✨ Introduction
A powerful Livewire rich text editor (WYSIWYG) component built on top of Jodit Editor, providing seamless integration with Laravel Livewire.
To use this package, you must have Livewire 3 or Livewire 4 installed.
📦 Installation
Install this package via Composer:
composer require mantix/livewire-jodit-text-editor
Include the Jodit Editor theme and the library in your layout or specific view:
<!-- Include Jodit CSS Styling --> <link rel="stylesheet" href="//unpkg.com/jodit@4.1.16/es2021/jodit.min.css"> <!-- Include the Jodit JS Library --> <script src="//unpkg.com/jodit@4.1.16/es2021/jodit.min.js"></script>
Or use NPM to install the Jodit Editor directly in your project:
npm install jodit
Import it in your app.js like:
// Jodit Editor import 'jodit/esm/plugins/resizer/resizer'; // Resizer plugin is used when inserting images import 'jodit/esm/plugins/video/video'; // Video plugin is used to insert videos // Feel free to add extra plugins here... import { Jodit } from 'jodit'; window.Jodit = Jodit;
And in your app.scss:
// Jodit Editor @import 'jodit/es2021/jodit';
For additional information, refer to the Jodit Editor documentation.
🎬 Basic Usage
The simplest way to use the editor:
<livewire:jodit-text-editor wire:model.live="content" />
🚀 Advanced Features
Customizing Toolbar Buttons
You can customize the toolbar buttons by passing an array:
<livewire:jodit-text-editor wire:model.live="content" :buttons="['bold', 'italic', 'underline', 'strikeThrough', '|', 'left', 'center', 'right', '|', 'link', 'image']" />
Using Multiple Editors
When using multiple editors on the same page, you can assign unique identifiers to target them individually:
<livewire:jodit-text-editor wire:model.live="description" identifier="description-editor" /> <livewire:jodit-text-editor wire:model.live="content" identifier="content-editor" />
Programmatically Updating Content
You can update editor content programmatically using Livewire's dispatch method:
Update all editors on the page:
// This will update all Jodit editors on the page $this->dispatch('update-jodit-content', $newContent);
Update a specific editor:
// This will only update the editor with the specified identifier $this->dispatch('update-jodit-content', ['description-editor', $newContent]);
🎨 Customization
The text editor component is entirely customizable. Publish the view file to customize it:
php artisan vendor:publish --tag=livewire-jodit-text-editor-views
After publishing, you can edit the view at resources/views/vendor/livewire-jodit-text-editor/livewire/jodit-text-editor.blade.php.
🔄 Changelog
Please see CHANGELOG for more information on what has changed recently.
🤝 Contributing
Please see CONTRIBUTING for details.
❤️ Support
Is this plugin helpful to you? Let me know by connecting on LinkedIn or on X.
mantix/livewire-jodit-text-editor 适用场景与选型建议
mantix/livewire-jodit-text-editor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 82.82k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2024 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wysiwyg」 「editor」 「livewire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mantix/livewire-jodit-text-editor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mantix/livewire-jodit-text-editor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mantix/livewire-jodit-text-editor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Livewire starter kit for Lunar e-commerce.
Adds more BBCode
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
Livewire component that provides drawers (slide overs) that support multiple children while maintaining state.
WYSIWYG editor for Yii2 based on Bootstrap 3
UEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 UEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本输入框。
统计信息
- 总下载量: 82.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 16
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-16