{"id":13770671,"url":"https://github.com/pouchcms/sveditorjs","last_synced_at":"2025-05-11T03:32:51.691Z","repository":{"id":204495002,"uuid":"711954722","full_name":"pouchcms/sveditorjs","owner":"pouchcms","description":"editorjs svelte wrapper","archived":false,"fork":false,"pushed_at":"2024-11-02T17:12:53.000Z","size":2783,"stargazers_count":35,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-17T06:40:25.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sveditorjs.vercel.app","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/pouchcms.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":"2023-10-30T14:05:19.000Z","updated_at":"2024-11-12T13:20:00.000Z","dependencies_parsed_at":"2024-11-02T17:21:54.887Z","dependency_job_id":"01152993-632a-4651-890a-daa430de2b94","html_url":"https://github.com/pouchcms/sveditorjs","commit_stats":null,"previous_names":["pouchcms/sveditorjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchcms%2Fsveditorjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchcms%2Fsveditorjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchcms%2Fsveditorjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchcms%2Fsveditorjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouchcms","download_url":"https://codeload.github.com/pouchcms/sveditorjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"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":[],"created_at":"2024-08-03T17:00:40.419Z","updated_at":"2025-05-11T03:32:50.967Z","avatar_url":"https://github.com/pouchcms.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":["JavaScript"],"readme":"\n## sveditorjs v2\n\nsveditorjs can be embed into any svelte or sveltekit project,the editor is wraped around editorjs ,for block editing that outputs clean json document.json can be consumed by any app.\n\non version we added support for sveltekit\nand added a utility helper \nthat generates html\n\n## docs and example\nsee the docs and example here [sveditorjs](https://sveditorjs.vercel.app):\n\n```bash\nnpm install --save sveditorjs\n```\n```js\n\u003cscript\u003e\n  import Editor ,{genHtml} from \"$lib/index.js\"; \n  \n  let modes = {\n          'js': 'JavaScript',\n          'py': 'Python',\n          'go': 'Go',\n          'cpp': 'C++',\n          'cs': 'C#',\n          'md': 'Markdown',\n        }\n    let data = {}; //correct editorjs json data\n    let urls = {} //this object should be \n    //{\n      upload:\"\",\n      load:\"\",\n    }\n async function handleChange(ev){\n    console.log(ev.detail) \n    let editor = ev.detail.editor;\n    editor.save().then(async (savedData)=\u003e{\n      // do something with data\n      console.log(window.current_sveditor); \n    // use helper to gen html\n    let html = await genHtml(savedData);  \n    console.log(html);\n    }).catch((err)=\u003e{console.log(err)})\n  }\n\u003c/script\u003e\n\n\u003cEditor data={data} urls={urls} modes={modes} top=\"true\" aside=\"true\" on:editor_ready={(ev)=\u003e{console.log(\"ready\",ev.detail)}} on:editor_change ={(ev)=\u003e{handleChange(ev)}} \u003e\n  \u003csvelte:fragment slot=\"top\" \u003e\n    top\n  \u003c/svelte:fragment\u003e\n  \u003csvelte:fragment slot=\"aside\" \u003e\n   aside\n  \u003c/svelte:fragment\u003e\n\u003csvelte:fragment slot=\"extra\" \u003e\n   extra unstyled\n  \u003c/svelte:fragment\u003e\n\u003c/Editor\u003e\n\n \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchcms%2Fsveditorjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouchcms%2Fsveditorjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchcms%2Fsveditorjs/lists"}