Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 1.49 KB

README.md

File metadata and controls

70 lines (53 loc) · 1.49 KB

Tiptap Editor for TALL stack

This is the repackage of georgeboot/laravel-tiptap (https://github.com/georgeboot/laravel-tiptap)

Screenshot

composer require wabsa/laravel-tiptap
yarn add laravel-tiptap

In your app.js:

import Alpine from 'alpinejs'
import LaravelTiptap from 'laravel-tiptap' // add this
Alpine.data('tiptapEditor', LaravelTiptap) // add this
Alpine.start()

In your blade file:

<x-tiptap-editor />

<!-- enable image upload -->
<x-tiptap-editor enable-image-upload />

Image upload

Ensure you have your s3 disk configured correctly in s3:

// config/filesystems.php

<?php

return [

    // other settings
    
    'disks' => [

        // other disks 

        's3' => [
            'driver' => 's3',
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'token' => env('AWS_SESSION_TOKEN'),
            'region' => env('AWS_DEFAULT_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'url' => env('AWS_URL'),
            // 'url' => 'https://my-cloudfront-id.cloudfront.net', // optional: if you use cloudfront or some other cdn in front of s3
            'endpoint' => env('AWS_ENDPOINT'),
        ],

        // ...

    ],

];

Add purge directory to TailwindCSS config:

module.exports = {
    purge: [
        // your existing purges
        './vendor/wabsa/laravel-tiptap/resources/views/**/*.blade.php',
    ],
}