summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/snippet/snippet_bundle.js
blob: 89822246bb82b1073bd45f1efe4acda420febba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */
/* global ace */

// require everything else in this directory
function requireAll(context) { return context.keys().map(context); }
requireAll(require.context('.', false, /^\.\/(?!snippet_bundle).*\.(js|es6)$/));

(function() {
  $(function() {
    var editor = ace.edit("editor");

    $(".snippet-form-holder form").on('submit', function() {
      $(".snippet-file-content").val(editor.getValue());
    });
  });
}).call(window);