Is there is any way to disable Copy, Paste and Dropping text in ng2-ace-editor. https://github.com/fxmontigny/ng2-ace-editor This is the one I have used in my angular 5 app.
to disable clipboard add the following command:
editor.commands.addCommand({
name: "breakTheEditor",
bindKey: "ctrl-c|ctrl-v|ctrl-x|ctrl-shift-v|shift-del|cmd-c|cmd-v|cmd-x",
exec: function() {}
});
to disable dragging use
![
"dragenter", "dragover", "dragend", "dragstart", "dragleave", "drop"
].forEach(function(eventName) {
editor.container.addEventListener(eventName, function(e) {
e.stopPropagation()
}, true)
});
editor.setOption("dragEnabled", false)