EZQMS-495 Hide styling buttons in readonly mode (#4321)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-01-08 21:20:28 +07:00 committed by GitHub
parent 7af0fefa4b
commit 85c98ead17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@
import textEditorPlugin from '../plugin'
import { DocumentId } from '../provider'
import { TextEditorCommandHandler, TextNodeAction } from '../types'
import { TextEditorCommandHandler, TextFormatCategory, TextNodeAction } from '../types'
import CollaborativeTextEditor from './CollaborativeTextEditor.svelte'
import { FileAttachFunction } from './extension/imageExt'
@ -171,6 +171,17 @@
{overflow}
{boundary}
{attachFile}
textFormatCategories={readonly
? []
: [
TextFormatCategory.Heading,
TextFormatCategory.TextDecoration,
TextFormatCategory.Link,
TextFormatCategory.List,
TextFormatCategory.Quote,
TextFormatCategory.Code,
TextFormatCategory.Table
]}
extensions={[...onExtensions()]}
{textNodeActions}
{canShowPopups}