1- import { EditorState , TextSelection } from 'prosemirror-state' ;
1+ import { EditorState } from 'prosemirror-state' ;
22import { EditorView } from 'prosemirror-view' ;
33import { DOMParser , DOMSerializer } from 'prosemirror-model' ;
44import { yXmlFragmentToProseMirrorRootNode } from 'y-prosemirror' ;
@@ -24,7 +24,6 @@ import { generateCollaborationData } from '@extensions/collaboration/collaborati
2424import { toggleHeaderFooterEditMode } from '../extensions/pagination/pagination-helpers.js' ;
2525import { hasSomeParentWithClass } from './super-converter/helpers.js' ;
2626import { useHighContrastMode } from '../composables/use-high-contrast-mode.js' ;
27- import { findWordBounds } from './helpers/findWordBounds.js' ;
2827/**
2928 * @typedef {Object } FieldValue
3029 * @property {string } input_id The id of the input field
@@ -576,7 +575,6 @@ export class Editor extends EventEmitter {
576575
577576 const doc = this . #generatePmData( ) ;
578577 const tr = this . state . tr . replaceWith ( 0 , this . state . doc . content . size , doc ) ;
579- tr . setMeta ( 'replaceContent' , true ) ;
580578 this . view . dispatch ( tr ) ;
581579 }
582580
@@ -950,12 +948,6 @@ export class Editor extends EventEmitter {
950948 pm . classList . remove ( 'header-footer-edit' ) ;
951949 pm . setAttribute ( 'aria-readonly' , false ) ;
952950 }
953-
954- // Imitate default double click behavior - word selection
955- const { state, dispatch } = view ;
956- const word = findWordBounds ( state . doc , pos ) ;
957- const tr = state . tr . setSelection ( TextSelection . create ( state . doc , word . from , word . to ) ) ;
958- dispatch ( tr ) ;
959951 }
960952 } ) ;
961953
0 commit comments