debian-mirror-gitlab/app/assets/javascripts/snippet/snippet_bundle.js

12 lines
222 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
/* global ace */
2016-09-13 17:45:13 +05:30
2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2018-03-27 19:54:05 +05:30
export default () => {
const editor = ace.edit('editor');
2016-09-13 17:45:13 +05:30
2018-03-27 19:54:05 +05:30
$('.snippet-form-holder form').on('submit', () => {
$('.snippet-file-content').val(editor.getValue());
2016-09-13 17:45:13 +05:30
});
2018-03-27 19:54:05 +05:30
};