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 3105878 commit e9a4bfe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/rails/app/frontend/entrypoints/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ 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 Down

0 comments on commit e9a4bfe

Please sign in to comment.