{"id":31658253,"url":"https://github.com/catpea/hoity-toity","last_synced_at":"2026-01-20T17:29:45.367Z","repository":{"id":316957487,"uuid":"1065263146","full_name":"catpea/hoity-toity","owner":"catpea","description":"Feature Packed Code Editor Web Component","archived":false,"fork":false,"pushed_at":"2025-09-27T22:11:00.000Z","size":353,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T15:27:56.969Z","etag":null,"topics":["codeeditor","webcomponents"],"latest_commit_sha":null,"homepage":"https://catpea.github.io/hoity-toity/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catpea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-27T11:21:25.000Z","updated_at":"2025-09-27T22:11:03.000Z","dependencies_parsed_at":"2025-09-27T21:22:38.503Z","dependency_job_id":"0d13d7f5-cdac-4063-82d7-04247e3600cb","html_url":"https://github.com/catpea/hoity-toity","commit_stats":null,"previous_names":["catpea/hoity-toity"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/catpea/hoity-toity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catpea%2Fhoity-toity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catpea%2Fhoity-toity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catpea%2Fhoity-toity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catpea%2Fhoity-toity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catpea","download_url":"https://codeload.github.com/catpea/hoity-toity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catpea%2Fhoity-toity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278977131,"owners_count":26078980,"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-10-08T02:00:06.501Z","response_time":56,"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":["codeeditor","webcomponents"],"created_at":"2025-10-07T15:16:18.318Z","updated_at":"2025-10-20T09:58:25.120Z","avatar_url":"https://github.com/catpea.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hoity-toity\nHoity Toity: Feature Packed Code Editor Web Component\n\nlanguage support: javascript, css, html, markdown, json, and xml\n\n```bash\n\nnpm i hoity-toity;\n\n```\n\n```HTML\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n    \u003ctitle\u003edemo\u003c/title\u003e\n    \u003cscript src=\"hoity-toity.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eHello, world!\u003c/h1\u003e\n    \u003choity-toity id=\"js\" language=\"javascript\" value=\"console.log('bork!');\"\u003e\u003c/hoity-toity\u003e\n    \u003c!-- see index.html for a codebin demo --\u003e\n    \u003cscript\u003e\n      const js = document.getElementById(\"js\");\n      js.addEventListener('change', (e)=\u003econsole.log(e.detail.value));\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n---\n\n## Key Features:\n\n1. **Multi-language Support**: The component supports JavaScript, HTML, and CSS through CodeMirror's language modules\n2. **Shadow DOM**: Uses Shadow DOM for style encapsulation\n3. **Reactive Attributes**: Responds to `language`, `theme`, and `value` attribute changes\n4. **Custom Events**: Emits a `change` event when content is modified\n5. **Public Methods**: Exposes `getValue()`, `setValue()`, and `focus()` methods\n\n## Usage Example:\n\n```html\n\u003c!-- Basic usage --\u003e\n\u003choity-toity language=\"javascript\" wrap=\"true\"\u003e\u003c/hoity-toity\u003e\n\n\u003c!-- With initial value --\u003e\n\u003choity-toity language=\"html\" value=\"\u003ch1\u003eHello\u003c/h1\u003e\"\u003e\u003c/hoity-toity\u003e\n\n\u003c!-- Listen for changes --\u003e\n\u003choity-toity id=\"editor\" language=\"css\"\u003e\u003c/hoity-toity\u003e\n\u003cscript\u003e\n  const editor = document.getElementById('editor');\n  editor.addEventListener('change', (e) =\u003e {\n    console.log('Content changed:', e.detail.value);\n  });\n\u003c/script\u003e\n\n\u003c!-- multiple editors --\u003e\n\n\u003cdiv class=\"row\"\u003e\n  \u003cdiv id=\"collapseJs\" class=\"col col-shown\" style=\"\"\u003e\n    \u003choity-toity id=\"js\" language=\"javascript\"\u003e\u003c/hoity-toity\u003e\n  \u003c/div\u003e\n  \u003cdiv id=\"collapseCss\" class=\"col col-shown\" style=\"\"\u003e\n    \u003choity-toity id=\"css\" language=\"css\"\u003e\u003c/hoity-toity\u003e\n  \u003c/div\u003e\n  \u003cdiv id=\"collapseHtml\" class=\"col col-shown\" style=\"\"\u003e\n    \u003choity-toity id=\"html\" language=\"html\"\u003e\u003c/hoity-toity\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatpea%2Fhoity-toity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatpea%2Fhoity-toity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatpea%2Fhoity-toity/lists"}