chore: vault member permissions (#2509)

This commit is contained in:
Aman Harwara
2023-09-18 19:53:34 +05:30
committed by GitHub
parent 2af610c7bf
commit 48e7820100
32 changed files with 331 additions and 94 deletions

View File

@@ -25,6 +25,11 @@ const CodeOptionsPlugin = () => {
const [selectedElementKey, setSelectedElementKey] = useState<NodeKey | null>(null)
const updateToolbar = useCallback(() => {
if (!editor.isEditable()) {
setIsCode(false)
return
}
const selection = $getSelection()
if (!$isRangeSelection(selection)) {
return