Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Nov 13, 2024
1 parent 5690753 commit f919081
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/components/Editor/EditorManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,20 @@ const EditorManager: React.FC = () => {
},
}}
>
{showAIPopup ? (
<AiEditMenu selectedText={editor.getText()} onEdit={() => {}} />
) : (
<button onClick={() => setShowAIPopup(true)} className="rounded p-2 hover:bg-gray-700">
Ask AI
</button>
)}
<div
onMouseDown={(e) => {
e.preventDefault()
e.stopPropagation()
}}
>
{showAIPopup ? (
<AiEditMenu selectedText={editor.getText()} onEdit={() => {}} />
) : (
<button onClick={() => setShowAIPopup(true)} className="rounded p-2 hover:bg-gray-700">
Ask AI
</button>
)}
</div>
</BubbleMenu>
)}
<SearchBar editor={editor} showSearch={showSearchBar} setShowSearch={setShowSearchBar} />
Expand Down

0 comments on commit f919081

Please sign in to comment.