{"id":26804386,"url":"https://github.com/umaranis/svelte-code-editor","last_synced_at":"2025-10-25T00:04:06.012Z","repository":{"id":284100998,"uuid":"953823744","full_name":"umaranis/svelte-code-editor","owner":"umaranis","description":"Code Editor for Svelte based on CodeMirror","archived":false,"fork":false,"pushed_at":"2025-03-24T07:06:27.000Z","size":149,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T07:26:51.281Z","etag":null,"topics":["code","codeeditor","editor","svelte","svelte5","sveltekit"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/umaranis.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}},"created_at":"2025-03-24T06:15:15.000Z","updated_at":"2025-03-24T07:06:31.000Z","dependencies_parsed_at":"2025-03-24T07:27:14.102Z","dependency_job_id":"6b81d5ff-bbf1-4ac6-afb4-5810ad41e696","html_url":"https://github.com/umaranis/svelte-code-editor","commit_stats":null,"previous_names":["umaranis/svelte-code-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaranis%2Fsvelte-code-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaranis%2Fsvelte-code-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaranis%2Fsvelte-code-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaranis%2Fsvelte-code-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umaranis","download_url":"https://codeload.github.com/umaranis/svelte-code-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249217,"owners_count":20747168,"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","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":["code","codeeditor","editor","svelte","svelte5","sveltekit"],"created_at":"2025-03-29T22:16:31.789Z","updated_at":"2025-10-25T00:04:06.006Z","avatar_url":"https://github.com/umaranis.png","language":"Svelte","readme":"# svelte-code-editor\n\n`svelte-code-editor` is a code editor for Svelte based on CodeMirror.\n\nIt is extracted out of the official [Svelte playground](https://svelte.dev/playground) into a component to facilitate reuse.\n\n![alt text](https://raw.githubusercontent.com/umaranis/svelte-code-editor/refs/heads/main/docs/images/screenshot.png)\n\nThe package contains the following components:\n\n| Component | Description |\n|-----------|-------------|\n| `Editor` | Core code editor component based on CodeMirror |\n| `TabbedEditor` | Editor with tab support for multiple files |\n| `ThemeToggle` | Toggle between light and dark themes |\n\n## Features\n\n- 🎨 Syntax highlighting for Svelte, JavaScript, Typescript and CSS\n- ✨ Autocompletion for Svelte, JavaScript, and CSS\n- 🔍 Search and replace\n- ⌨️ Vim mode\n- 🌓 Dark and light themes\n\n## Installation\n\n```bash\npnpm add @umaranis/svelte-code-editor\n```\n\n## Usage\n\n1- Import the desired components into the page `import TabbedEditor from '$lib/TabbedEditor.svelte';`\n\n2- Create `File` and `Workspace` objects\n\n3- Include the component in your page `\u003cTabbedEditor {workspace} /\u003e`\n\nHere is  an example:\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n import Editor from '$lib/Editor.svelte';\n import TabbedEditor from '$lib/TabbedEditor.svelte';\n import { Workspace } from '$lib/Workspace.svelte';\n import ThemeToggle from '$lib/components/ThemeToggle.svelte';\n import type { File } from '$lib/Workspace.svelte';\n import '@umaranis/svelte-code-editor/styles/index.css';\n\n const file: File = {\n  type: 'file',\n  name: 'App.svelte',\n  basename: 'App.svelte',\n  contents: '',\n  text: true\n };\n\n const workspace = new Workspace([file], {\n  initial: 'App.svelte',\n  svelte_version: 'latest',\n  onupdate() {},\n  onreset() {}\n });\n\u003c/script\u003e\n\n\u003ch1\u003eWelcome to your svelte-code-editor project\u003c/h1\u003e\n\n\u003cp\u003eTheme: \u003cThemeToggle /\u003e\u003c/p\u003e\n\n\u003cTabbedEditor {workspace} /\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaranis%2Fsvelte-code-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumaranis%2Fsvelte-code-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaranis%2Fsvelte-code-editor/lists"}