How to Disable Drag and Drop in TypeScript DOCX Editor

28 Aug 20261 minute to read

TypeScript DOCX Editor (Document Editor) provides support to drag and drop contents within the component and it can be customized (enable and disable) using the allowDragAndDrop property in the Document Editor settings.

The following example illustrates how to disable the drag and drop option in the DocumentEditorContainer.

let container: DocumentEditorContainer = new DocumentEditorContainer({ enableToolbar: true, height: '590px', documentEditorSettings: { allowDragAndDrop: false } });

The default value of the allowDragAndDrop property is true.

The following example illustrates how to disable the drag and drop option in the DocumentEditor.

let editor: DocumentEditor = new DocumentEditor({ height: '590px', documentEditorSettings: { allowDragAndDrop: false } });

The default value of the allowDragAndDrop property is true.