How to Disable Drag and Drop in JavaScript DOCX Editor

28 Aug 20261 minute to read

JavaScript DOCX Editor (Document Editor) provides support to drag and drop contents within the component. Drag and drop can be enabled or disabled using the allowDragAndDrop property in Document Editor settings.

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

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

Default value of allowDragAndDrop property is true.

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

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

Default value of allowDragAndDrop property is true.