Skip to content

Commit

Permalink
Merge pull request #2197 from laws-africa/paste-bug
Browse files Browse the repository at this point in the history
work-around for pasting
  • Loading branch information
longhotsummer authored Aug 15, 2024
2 parents 2ee6004 + 4d55d4e commit 364cfde
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 364cfde

Please sign in to comment.