{"id":30180971,"url":"https://github.com/streamich/collaborative-editor","last_synced_at":"2025-08-12T08:06:42.915Z","repository":{"id":257793573,"uuid":"726490215","full_name":"streamich/collaborative-editor","owner":"streamich","description":"JSON CRDT \"str\" node binding to any generic plain text editor UI.","archived":false,"fork":false,"pushed_at":"2025-08-07T18:29:28.000Z","size":18642,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-07T20:36:39.637Z","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/streamich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"streamich"}},"created_at":"2023-12-02T14:53:45.000Z","updated_at":"2025-07-30T14:11:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"4adb251f-d54c-4673-ae34-73dec53515f7","html_url":"https://github.com/streamich/collaborative-editor","commit_stats":null,"previous_names":["streamich/collaborative-editor"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/streamich/collaborative-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fcollaborative-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fcollaborative-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fcollaborative-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fcollaborative-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/collaborative-editor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fcollaborative-editor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270024697,"owners_count":24514054,"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-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2025-08-12T08:06:20.352Z","updated_at":"2025-08-12T08:06:42.901Z","avatar_url":"https://github.com/streamich.png","language":"TypeScript","funding_links":["https://github.com/sponsors/streamich"],"categories":[],"sub_categories":[],"readme":"# Collaborative plain text editor binding\n\nThis package provides binding for a generic text editor to a [JSON CRDT `str` node](https://jsonjoy.com/specs/json-crdt/model-document/node-types#The-str-RGA-String-Node-Type).\n\n![collaborative-editor](https://github.com/user-attachments/assets/7d1c2158-5890-4e73-8aa8-bc929e9135f8)\n\n\n## Usage\n\nInstallation:\n\n```\nnpm install json-joy collaborative-editor\n```\n\nSimple integration for any plain text editor, for the most basic integration\nyou only need to implement the `.get()` and `.set()` methods:\n\n```ts\nimport {StrBinding, EditorFacade} from 'collaborative-editor';\nimport {Model} from 'json-joy/lib/json-crdt';\n\nconst str = model.api.str(['path', 'to', 'string']);\nconst unbind = StrBinding.bind(str, {\n  get: () =\u003e input.value,\n  set: (value: string) =\u003e input.value = value,\n}, true);\n```\n\nFor a better integration, implement as many `EditorFacade` methods as possible:\n\n```ts\nimport {StrBinding, EditorFacade} from 'collaborative-editor';\n\nconst editor: EditorFacade = {\n  // ...\n};\n\nconst str = model.api.str(['path', 'to', 'string']);\nconst binding = new StrBinding(str, editor);\n\nbinding.syncFromModel();\nbinding.bind(polling);\n\n// When done, unbind the binding.\nbinding.unbind();\n```\n\n\n## Preview\n\n- See [demo](https://streamich.github.io/collaborative-editor).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fcollaborative-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Fcollaborative-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fcollaborative-editor/lists"}