freshinteractive/fresh-tap
最新稳定版本:0.0.4
Composer 安装命令:
composer require freshinteractive/fresh-tap
包简介
A Laravel Nova field.
README 文档
README
A custom Laravel Nova Field for Fresh Tap.
Fresh Tap is a framework-agnostic Custom Element WYSIWYG Editor build on top of Tiptap and Vue.
Installation
composer require freshinteractive/fresh-tap
Usage
<?php
namespace App\Nova;
...
use Freshinteractive\FreshTap\FreshTap;
...
class YourResource extends Resource
{
...
/**
* Get the fields displayed by the resource.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function fields(Request $request)
{
...,
FreshTap::make('Content')
->previewUrl('https://your-preview-url-here.com/page-content-will-live-on')
->previewSelector('.css-selector')
->previewWrapperElement([
'element' => 'div',
'attributes' => [
'class' => 'your-wrapper-class'
]
])
->keepEmptyParagraphLineBreaks(),
->editorStyles("
.FreshTapEditor .ProseMirror { display: grid; grid-template-columns: 100%; gap: 20px; }
")
}
}
Notes:
None of the methods are required. Just `FreshTap::make('Content')` works.
When using `->editorStyles()make sure that your styles are prepended with.FreshTapEditor .ProseMirror`. These styles will only be applied to the instance of the editor that it is implemented on.
统计信息
- 总下载量: 472
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-12