Open MrMooky opened 1 month ago
I got it working now like this:
<div x-data="editor({{ $content }})">
<div id="bubblemenu" class="flex items-center space-x-3">
<button type="button" @click="toggleBold()" :class="{'active' : isActive('bold')}">
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">...</svg>
</button>
<button type="button" @click="toggleItalic()" :class="{'active' : isActive('italic')}">
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">...</svg>
</button>
</div>
<template class="relative" x-if="isLoaded()">
...
But using :class="{'active' : isActive('bold', updatedAt)}"
does not work within the BubbleMenu. It would be great if there was an extended example of the BubbleMenu built with AlpineJS.
Affected Packages
extension-bubble-menu
Version(s)
2.8.0
Bug Description
The menu sort of appears, but it's broken and I don't know why. I should note that I already use Tippy on my website, but even after removing it, the broken menu remains. Clicking on it doesn't do a thing either. There are not errors in the console.
I added the extension like this:
The frontend shows this:
My template looks like this:
Browser Used
Safari
Code Example URL
No response
Expected Behavior
I expect it to show the bold svg. The svg itself works fine, as I already use it in the main menu. But I also tried using simple text, same issue.
Additional Context (Optional)
No response
Dependency Updates