Skip to content
Discussion options

You must be logged in to vote

I don't think Tailwind will work inside the frame. Maybe this works if you import into the frame's document, for example:

$content = Str::markdown($this->data['content'] ?? '');

$html = <<<HTML
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <script src="https://cdn.tailwindcss.com"></script>
    </head>
    <body class="p-6 bg-white dark:bg-gray-900 text-gray-700 dark:text-gray-300">
        $content
    </body>
    </html>
HTML;

$base64 = base64_encode($html);

...


->modalContent(fn ($record): View => view(
    'iframe-preview-html',
    [
        'record' => $record,
        'base64' => $base64,
    ],
))

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Lightz2002
Comment options

@leandrocfe
Comment options

@Lightz2002
Comment options

@leandrocfe
Comment options

Answer selected by Lightz2002
@Lightz2002
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants