reazzon/gutenberg
Composer 安装命令:
composer require reazzon/gutenberg
包简介
Drag&Drop richeditor with blocks for October CMS backend forms.
README 文档
README
PLUGIN CURRENTLY IN BETA. AND IT WILL STAY IN BETA MAYBE FOREVER.
Gutenberg is a rich-text visual editor from WordPress, with the features of bulidng content with blocks. With Gutenberg, you can create truly unique content for your website by simply dragging and dropping blocks.
You can test it online here Gutenberg playground.
This plugin allows you to embed Gutenberg in the backend form of your own model by creating Polymorph relation .
Integration of Laraberg by VanOns\Laraberg for OctoberCMS. All credits goes to VanOns.
Working integrations:
Coming Soon integrations:
Available blocks:
- Code preview and all standard features such as: custom styles, block settings, reusable blocks.
- Common blocks
- Paragraph - (All text formatting also works).
- Image
- Heading
- Audio
- Gallery
- Cover
- File
- List
- Quote
- Video
- Formatting
- Code
- Preformatted
- Pull quote
- Classic
- Custom HTML
- Table
- Verse
- Layout elements
- Media & text
- Columns
- Button
- Separator
- Spacer
- Embeds
- All embeds
In work:
Mediauploader with native OctoberCMS MedialibraryDONE in 1.0.7 updateReusable blocks aren't workingDONE in 1.0.8 updateRemoving WP widgetsDONE in 1.0.9 updateRainLab.Blog integrationDONE in 1.1.0 updateLovata.GoodNews integrationDONE in 1.1.2 updateMigration to release version of LarabergDONE in 1.2.0 updateIndikator.News integrationDONE in 1.2.5 update- RainLab.StaticPages integration
Later work:
- Inline image incorrect behavior (Gutenberg.js bug, need updates from them)
- Multiple instances of Gutenberg on one page (Gutenberg.js bug, need updates from them)
I will be happy if you help me with any form of custom functions implementation.
Please sumbit your PR in plugin Github Repository.
Notes
As we now on Laraberg 1.0.0-rc.1, i will investigate more about creating multiple instances of Gutenberg on one page.
Installation
Install plugin by OctoberCMS plugin updater.
Go to Settings –> Updates&Plugins find Gutenberg in plugin search. Click on icon and install it.
or via Composer
composer require reazzon/gutenberg
Usage
This plugin works only by implementing Gutenberg behavior in your model.
It will create morphOne relation with Gutenberg\Content model.
Go to your model and add behavior in $implement array:
public $implement = ['ReaZzon.Gutenberg.Behaviors.Gutenbergable'];
After you need to add behavior to $implement array in your model controller.
public $implement = ['ReaZzon.Gutenberg.Behaviors.GutenbergController'];
Done. Your model now has morphOne with Gutenberg\Content Model by content field that renders only on created model page.
Rendering
Rendering examples below.
{{ post.content.render }}
$post->content->render();
In order to correctly display Gutenberg styles. You must add laraberg public styles to your page:
<link href="/plugins/reazzon/gutenberg/assets/laraberg.min.css" rel="stylesheet">
Working with source js code
If you want to add some features you can work with source files of Laraberg in /plugins/reazzon/gutenberg/formwidgets/gutenberg/assets/resources, to set up all environment follow these steps:
- Clone Gutenberg rep.:
git clone https://github.com/WordPress/gutenberg.git gutenberg - After cloning execute these commands:
cd gutenberg // go to Gutenberg folder npm i // install all dependencies npm run build // Build Gutenberg sudo npm link // Link it to your global node_modules cd .. // Go back to Laraberg root npm i // install all dependencies npm link gutenberg // Link Gutenberg package to Laraberg
- Now you set up.
Developed by reazzon.ru
Russian OctoberCMS developer community OctoClub.ru
reazzon/gutenberg 适用场景与选型建议
reazzon/gutenberg 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 6.09k 次下载、GitHub Stars 达 59, 最近一次更新时间为 2019 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「octobercms」 「gutenberg」 「reazzon」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 reazzon/gutenberg 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 reazzon/gutenberg 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 reazzon/gutenberg 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Create Gutenberg blocks from Twig templates and ACF fields.
User plugin for October CMS
Laravel Horizon integration for October CMS
Maintenance page plugin
Location plugin for October CMS
统计信息
- 总下载量: 6.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 59
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-03