{"id":18265368,"url":"https://github.com/troy351/emmet-monaco-es","last_synced_at":"2025-08-01T22:41:35.955Z","repository":{"id":31114361,"uuid":"108238257","full_name":"troy351/emmet-monaco-es","owner":"troy351","description":"Emmet support for Monaco Editor","archived":false,"fork":false,"pushed_at":"2024-10-26T05:30:03.000Z","size":624,"stargazers_count":84,"open_issues_count":2,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T07:46:21.282Z","etag":null,"topics":["emmet","emmet-monaco","emmet-plugin","monaco-editor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/troy351.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-25T07:56:43.000Z","updated_at":"2025-06-30T07:04:58.000Z","dependencies_parsed_at":"2024-06-11T03:57:53.619Z","dependency_job_id":"aeb301df-c45f-468b-91c6-820fd62585fa","html_url":"https://github.com/troy351/emmet-monaco-es","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/troy351/emmet-monaco-es","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troy351%2Femmet-monaco-es","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troy351%2Femmet-monaco-es/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troy351%2Femmet-monaco-es/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troy351%2Femmet-monaco-es/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troy351","download_url":"https://codeload.github.com/troy351/emmet-monaco-es/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troy351%2Femmet-monaco-es/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268308958,"owners_count":24230161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emmet","emmet-monaco","emmet-plugin","monaco-editor"],"created_at":"2024-11-05T11:17:59.758Z","updated_at":"2025-08-01T22:41:35.889Z","avatar_url":"https://github.com/troy351.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emmet-monaco-es\n\n\u003cp\u003e\n  \u003ca href=\"https://npmcharts.com/compare/emmet-monaco-es?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/emmet-monaco-es.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/emmet-monaco-es\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/emmet-monaco-es.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/emmet-monaco-es\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/emmet-monaco-es.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nEmmet Support for [Monaco Editor](https://github.com/Microsoft/monaco-editor), based on [vscode-emmet-helper](https://github.com/microsoft/vscode-emmet-helper)\n\n## Advantage\n\n- Almost the same as VSCode's built-in emmet, integrated with completion provider\n- Various languages support\n\n## Install\n\n```shell\n$ npm install emmet-monaco-es\n```\n\n## Usage\n\n#### NOTE\n\nThe `emmet` functionality was bound to language features not to a specific editor instance.\n\n- `emmetHTML` works for `HTML` compatible languages, like `PHP`, for `html` only by default\n- `emmetCSS` works for `CSS` compatible languages, like `LESS` / `SCSS`, for `css` only by default\n- `emmetJSX` works for `JSX` compatible languages, like `JavaScript` / `TypeScript` / `MDX`, for `javascript` only by default\n\n_Follow [this](https://github.com/microsoft/monaco-editor/issues/264#issuecomment-654578687) guide to make Monaco Editor support `TSX`_\n\n**Initialize emmet should BEFORE all monaco editor instance creation**\n\n#### ESM\n\n```javascript\nimport { emmetHTML, emmetCSS, emmetJSX, expandAbbreviation, registerCustomSnippets } from 'emmet-monaco-es'\n\n// `emmetHTML` , `emmetCSS` and `emmetJSX` are used the same way\nconst dispose = emmetHTML(\n  // monaco-editor it self. If not provided, will use window.monaco instead.\n  // This could make the plugin support both ESM and AMD loaded monaco-editor\n  monaco,\n  // languages needs to support html markup emmet, should be lower case.\n  ['html', 'php'],\n)\n\n// run it if you want to dispose emmetHTML.\n// NOTE: all languages specified will be disposed.\ndispose()\n\n// internal expand API, if you want to extend functionality with emmet\n// check out the emmet repo https://github.com/emmetio/emmet for how to use it\nexpandAbbreviation('a', { type: 'markup', syntax: 'html' }) // \u003ca href=\"\"\u003e\u003c/a\u003e\nexpandAbbreviation('fz14', { type: 'stylesheet', syntax: 'css' }) // font-size: 14px;\n\n// register custom snippets\nregisterCustomSnippets('html', {\n  ull: 'ul\u003eli[id=${1} class=${2}]*2{ Will work with html, pug, haml and slim }',\n  oll: '\u003col\u003e\u003cli id=${1} class=${2}\u003e Will only work in html \u003c/ol\u003e',\n  ran: '{ Wrap plain text in curly braces }',\n})\n```\n\n#### Browser\n\n```html\n\u003cscript src=\"https://unpkg.com/emmet-monaco-es/dist/emmet-monaco.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  // NOTE: monaco-editor should be loaded first\n  // see the above esm example for details\n  emmetMonaco.emmetHTML(monaco)\n\u003c/script\u003e\n```\n\n## Limitation\n\nDoes **NOT** support Emmet for embed CSS inside HTML / JSX / TSX\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroy351%2Femmet-monaco-es","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroy351%2Femmet-monaco-es","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroy351%2Femmet-monaco-es/lists"}