定制 freshinteractive/fresh-tap 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-12