{"id":24540794,"url":"https://github.com/code-gio/svelty-editor","last_synced_at":"2026-02-13T12:13:26.285Z","repository":{"id":267274238,"uuid":"900625985","full_name":"code-gio/svelty-editor","owner":"code-gio","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-04T19:52:09.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T03:17:38.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/code-gio.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}},"created_at":"2024-12-09T07:03:21.000Z","updated_at":"2025-08-24T05:08:24.000Z","dependencies_parsed_at":"2025-04-16T07:47:03.513Z","dependency_job_id":null,"html_url":"https://github.com/code-gio/svelty-editor","commit_stats":null,"previous_names":["code-gio/svelty-editor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code-gio/svelty-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelty-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelty-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelty-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelty-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-gio","download_url":"https://codeload.github.com/code-gio/svelty-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-gio%2Fsvelty-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29405161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-01-22T18:14:56.389Z","updated_at":"2026-02-13T12:13:26.263Z","avatar_url":"https://github.com/code-gio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelty Editor\n\nA Svelte wrapper for Editor.js with TypeScript support and enhanced configuration options.\n\n## Features\n\n- 🎯 Full TypeScript support\n- ⚡ Dynamic tool registration\n- 🌍 Internationalization (i18n) support\n- 📝 Read-only mode\n- 🛠 Customizable inline toolbar\n- 🎨 Block tunes support\n- 📊 Custom event handling\n- 📝 Advanced configuration options\n\n## Installation\n\n```bash\n# Install the library\nnpm install svelty-editor\n\n# Install required peer dependencies\nnpm install @editorjs/editorjs\n\n# Install optional tools as needed\nnpm install @editorjs/header @editorjs/list @editorjs/paragraph\n```\n\n## Basic Usage\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { SveltyEditor } from 'svelty-editor';\n  import type { OutputData } from '@editorjs/editorjs';\n\n  const handleChange = (data: OutputData) =\u003e {\n    console.log('Content changed:', data);\n  };\n\u003c/script\u003e\n\n\u003cSveltyEditor\n  onChange={handleChange}\n  placeholder=\"Start writing...\"\n  autofocus={true}\n/\u003e\n```\n\n## Advanced Configuration\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { SveltyEditor } from 'svelty-editor';\n  import type { OutputData } from '@editorjs/editorjs';\n  \n  let editor: any;\n\n  const editorConfig = {\n    defaultBlock: 'paragraph',\n    autofocus: true,\n    placeholder: 'Start writing an awesome story!',\n    logLevel: 'ERROR',\n    inlineToolbar: ['link', 'marker', 'bold', 'italic'],\n    tools: {\n      header: {\n        inlineToolbar: true,\n        config: {\n          placeholder: 'Enter a header',\n          levels: [1, 2, 3],\n          defaultLevel: 1\n        }\n      },\n      list: {\n        inlineToolbar: true\n      }\n    },\n    i18n: {\n      messages: {\n        ui: {\n          'blockTunes.deleteTune.delete': 'Delete',\n          'blockTunes.deleteTune.confirm': 'Confirm'\n        },\n        toolNames: {\n          'header': 'Heading',\n          'list': 'List'\n        }\n      }\n    },\n    onChange: (api, event) =\u003e {\n      console.log('Content changed:', event);\n    },\n    onReady: () =\u003e {\n      console.log('Editor is ready!');\n    }\n  };\n\u003c/script\u003e\n\n\u003cSveltyEditor\n  bind:this={editor}\n  {...editorConfig}\n/\u003e\n```\n\n## Adding Custom Tools\n\n```typescript\n// Registering a custom tool\nawait editor.registerTool(\n  'customTool', \n  () =\u003e import('./CustomTool'),\n  {\n    inlineToolbar: true,\n    config: {\n      // custom tool configuration\n    }\n  }\n);\n```\n\n## Available Methods\n\n```typescript\n// Save editor content\nconst data = await editor.save();\n\n// Toggle read-only mode\neditor.setReadOnly(true);\n\n// Register a new tool\nawait editor.registerTool(name, toolLoader, config);\n\n// Get editor manager instance for advanced usage\nconst manager = editor.getManager();\n```\n\n## Configuration Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `data` | `OutputData` | Initial editor content |\n| `onChange` | `(data: OutputData) =\u003e void` | Callback when content changes |\n| `placeholder` | `string` | Editor placeholder text |\n| `autofocus` | `boolean` | Auto focus editor on load |\n| `readOnly` | `boolean` | Enable read-only mode |\n| `defaultBlock` | `string` | Default block type |\n| `logLevel` | `'VERBOSE' \\| 'INFO' \\| 'WARN' \\| 'ERROR'` | Logging level |\n| `inlineToolbar` | `boolean \\| string[]` | Configure inline toolbar |\n| `tools` | `Record\u003cstring, EditorTool\u003e` | Configure editor tools |\n| `i18n` | `I18nConfig` | Internationalization config |\n| `tunes` | `string[]` | Block tunes configuration |\n\n## TypeScript Support\n\nThe library includes comprehensive TypeScript definitions. You can import types like this:\n\n```typescript\nimport type { \n  EditorOptions,\n  EditorTool,\n  EditorChangeEvent \n} from 'svelty-editor';\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n\n## Credits\n\nThis library is powered by [Editor.js](https://editorjs.io/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-gio%2Fsvelty-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-gio%2Fsvelty-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-gio%2Fsvelty-editor/lists"}