Просмотр исходного кода

Set EditorState.readOnly on DocumentDiffViewer (#16756)

GitOrigin-RevId: 4c38441c3ca3010bf28544e237a5b76f7a26b000
Alf Eaton 2 лет назад
Родитель
Сommit
f06f2ef99e

+ 1 - 0
services/web/frontend/js/features/history/components/diff-view/document-diff-viewer.tsx

@@ -25,6 +25,7 @@ import { inlineBackground } from '../../../source-editor/extensions/inline-backg
 function extensions(themeOptions: Options): Extension[] {
   return [
     EditorView.editable.of(false),
+    EditorState.readOnly.of(true),
     EditorView.contentAttributes.of({ tabindex: '0' }),
     lineNumbers(),
     EditorView.lineWrapping,