diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /app/assets/javascripts/snippet | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'app/assets/javascripts/snippet')
-rw-r--r-- | app/assets/javascripts/snippet/snippet_bundle.js | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/app/assets/javascripts/snippet/snippet_bundle.js b/app/assets/javascripts/snippet/snippet_bundle.js index a3ed8d9c632..76a1f6d1458 100644 --- a/app/assets/javascripts/snippet/snippet_bundle.js +++ b/app/assets/javascripts/snippet/snippet_bundle.js @@ -3,18 +3,6 @@ import setupCollapsibleInputs from './collapsible_input'; let editor; -const initAce = () => { - const editorEl = document.getElementById('editor'); - const form = document.querySelector('.snippet-form-holder form'); - const content = document.querySelector('.snippet-file-content'); - - editor = initEditorLite({ el: editorEl }); - - form.addEventListener('submit', () => { - content.value = editor.getValue(); - }); -}; - const initMonaco = () => { const editorEl = document.getElementById('editor'); const contentEl = document.querySelector('.snippet-file-content'); @@ -36,15 +24,7 @@ const initMonaco = () => { }); }; -export const initEditor = () => { - if (window?.gon?.features?.monacoSnippets) { - initMonaco(); - } else { - initAce(); - } - setupCollapsibleInputs(); -}; - export default () => { - initEditor(); + initMonaco(); + setupCollapsibleInputs(); }; |