How to use the emmet/action/main.add function in emmet

To help you get started, we’ve selected a few emmet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emmetio / brackets-emmet / main.js View on Github external
function registerInteractiveCommands(menu) {
		actions.add('interactive_expand_abbreviation', function() {}, 'Expand Abbreviation (interactive)');
		
		['wrap_with_abbreviation', 'update_tag', 'interactive_expand_abbreviation'].forEach(function(cmd) {
			var action = actions.get(cmd);
			CommandManager.register(actionLabel(action, cmd), 'io.emmet.' + cmd, function() {
				editor.setup(EditorManager.getFocusedEditor());
				interactive.run(cmd, editor);
			});
		});

	}