mirror of https://github.com/portainer/portainer
fix(stacks): update web editor to set tab key to insert spaces (#2735)
parent
da44f14e07
commit
c152d3f62e
|
@ -11,7 +11,13 @@ angular.module('portainer.app')
|
||||||
var codeMirrorYAMLOptions = {
|
var codeMirrorYAMLOptions = {
|
||||||
mode: 'text/x-yaml',
|
mode: 'text/x-yaml',
|
||||||
gutters: ['CodeMirror-lint-markers'],
|
gutters: ['CodeMirror-lint-markers'],
|
||||||
lint: true
|
lint: true,
|
||||||
|
extraKeys: {
|
||||||
|
Tab: function(cm) {
|
||||||
|
var spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
|
||||||
|
cm.replaceSelection(spaces);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
service.applyCodeMirrorOnElement = function(element, yamlLint, readOnly) {
|
service.applyCodeMirrorOnElement = function(element, yamlLint, readOnly) {
|
||||||
|
|
Loading…
Reference in New Issue