mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	Cmd/Ctrl S Saves and submits custom css if the cursor is inside the editor
This commit is contained in:
		@@ -2,7 +2,13 @@
 | 
				
			|||||||
(function () {
 | 
					(function () {
 | 
				
			||||||
    if($("#css_editor").length != 0) {
 | 
					    if($("#css_editor").length != 0) {
 | 
				
			||||||
        var editor = ace.edit("css_editor");
 | 
					        var editor = ace.edit("css_editor");
 | 
				
			||||||
        debugger;
 | 
					        editor.commands.addCommand({
 | 
				
			||||||
 | 
					            name: 'save',
 | 
				
			||||||
 | 
					            bindKey: {win: "Ctrl-S", "mac": "Cmd-S"},
 | 
				
			||||||
 | 
					            exec: function(editor) {
 | 
				
			||||||
 | 
					                $('#submit-btn').trigger('click');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    function postForm() {
 | 
					    function postForm() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user