Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laraberg and Inertia setup #214

Open
dingo-d opened this issue Feb 25, 2025 · 0 comments
Open

Laraberg and Inertia setup #214

dingo-d opened this issue Feb 25, 2025 · 0 comments

Comments

@dingo-d
Copy link

dingo-d commented Feb 25, 2025

Has anybody tried using Laraberg with Inertia? Is this possible?

I tried with this approach in my app.blade.php

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title inertia>{{ config('app.name', 'Laravel') }}</title>

        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />

        <link rel="stylesheet" href="{{ asset('vendor/laraberg/css/laraberg.css') }}">
        <script src="{{ asset('vendor/laraberg/js/laraberg.js') }}"></script>

        @routes
        @viteReactRefresh
        @vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"])
        @inertiaHead
    </head>
    <body class="font-sans antialiased">
        <script>
            window.addEventListener('DOMContentLoaded', function () {
                Laraberg.init('laraberg-editor', {
                    height: '100dvh',
                });
            });
        </script>
        @inertia
    </body>
</html>

But no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant