How to use the emmet/parser/abbreviation.expand 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 / interactive.js View on Github external
update: function(abbr) {
					var result, replaced;
					for (var i = selCtx.length - 1, ctx; i >= 0; i--) {
						ctx = selCtx[i];
						result = '';
						try {
							if (abbr) {
								result = parser.expand(abbr, ctx);
							} else {
								result = ctx.pastedContent;
							}
						} catch (e) {
							console.error(e);
							result = ctx.pastedContent;
						}

						editor._selection.index = i;
						replaced = editor.replaceContent(result, ctx.selection.start, ctx.selection.end);
						ctx.finalCaret = getCaret(editor.editor);
						updateFinalCarets(selCtx, i, lineDelta(ctx.pastedContent, replaced));
					}
				},
				confirm: function() {