UBERF-162 Hide collaborators text selection (#3822)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2023-10-11 01:31:04 +07:00 committed by GitHub
parent 84d81417fe
commit 929d4e2feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -33,6 +33,7 @@
import { CollaborationIds, TextFormatCategory, TextNodeAction } from '../types'
import { calculateDecorations } from './diff/decorations'
import { noSelectionRender } from './editor/collaboration'
import { defaultEditorAttributes } from './editor/editorProps'
import { completionConfig, defaultExtensions } from './extensions'
import { InlineStyleToolbarExtension } from './extension/inlineStyleToolbar'
@ -239,7 +240,8 @@
user: {
name: currentUser.email,
color: getPlatformColorForText(currentUser.email, $themeStore.dark)
}
},
selectionRender: noSelectionRender
}),
DecorationExtension,
Completion.configure({

View File

@ -0,0 +1,18 @@
//
// Copyright © 2023 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { DecorationAttrs } from 'prosemirror-view'
export const noSelectionRender = (_user: Record<string, any>): DecorationAttrs => ({})