Disable drag and drop in EJ2 JavaScript Document editor control

10 May 20231 minute to read

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

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

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

Note: Default value of allowDragAndDrop property is true.

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

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

Note: Default value of allowDragAndDrop property is true.