Skip to content

Commit

Permalink
work-around for pasting
Browse files Browse the repository at this point in the history
ref #2196
  • Loading branch information
longhotsummer committed Aug 15, 2024
1 parent 2ee6004 commit 62d14ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion indigo_app/static/javascript/indigo/views/document_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@

setupTextEditor: function() {
if (!this.textEditor) {
var opts = this.grammarModel.monacoOptions();
// hack to work around pasting not working in monaco >= 0.39
// see https://github.com/laws-africa/indigo/issues/2196
opts.pasteAs = {enabled: false};
this.textEditor = window.monaco.editor.create(
this.el.querySelector('.document-text-editor .monaco-editor'),
this.grammarModel.monacoOptions()
opts,
);
new ResizeObserver(() => { this.textEditor.layout(); }).observe(this.textEditor.getContainerDomNode());
this.grammarModel.setupEditor(this.textEditor);
Expand Down

0 comments on commit 62d14ac

Please sign in to comment.