Skip to content

Commit

Permalink
POC: bubble menu
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Apr 30, 2024
1 parent e9a4bfe commit 2a1ae21
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/rails/app/frontend/entrypoints/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ window.Stimulus.debug = true
Stimulus.register("embed", EmbedController)
Stimulus.register("tip-tap-mirror", TipTapMirrorController)

let bubbleMenuAdded = false
function addBubbleMenu () {
document.querySelectorAll("rhino-editor").forEach((editor) => {
const menu = document.querySelector(".menu")

if (!menu) return

bubbleMenuAdded = true
editor.addExtensions(
BubbleMenu.configure({
element: menu
Expand All @@ -31,7 +29,6 @@ function addBubbleMenu () {
})
}

document.addEventListener("rhino-before-initialize", addBubbleMenu)
document.addEventListener("rhino-initialize", addBubbleMenu)

ActiveStorage.start()
Expand Down

0 comments on commit 2a1ae21

Please sign in to comment.