{"id":28043053,"url":"https://github.com/sftsrv/structured-html","last_synced_at":"2025-05-11T15:36:51.358Z","repository":{"id":65493253,"uuid":"593359200","full_name":"sftsrv/structured-html","owner":"sftsrv","description":"A little library for converting HTML into a structured data format that is compatible with EditorJS","archived":false,"fork":false,"pushed_at":"2024-03-26T17:48:50.000Z","size":72,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T18:54:12.274Z","etag":null,"topics":["editorjs","html","library","typescript"],"latest_commit_sha":null,"homepage":"https://jsr.io/@sftsrv/structured-html","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sftsrv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-01-25T20:23:46.000Z","updated_at":"2025-01-03T07:55:03.000Z","dependencies_parsed_at":"2024-03-26T17:51:53.039Z","dependency_job_id":null,"html_url":"https://github.com/sftsrv/structured-html","commit_stats":null,"previous_names":["sftsrv/structured-html","nabeelvalley/html-editorjs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sftsrv%2Fstructured-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sftsrv%2Fstructured-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sftsrv%2Fstructured-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sftsrv%2Fstructured-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sftsrv","download_url":"https://codeload.github.com/sftsrv/structured-html/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253591724,"owners_count":21932878,"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":["editorjs","html","library","typescript"],"created_at":"2025-05-11T15:36:50.775Z","updated_at":"2025-05-11T15:36:51.340Z","avatar_url":"https://github.com/sftsrv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Structured HTML\n\nA little library for simplifying and transforming HTML into structured data\n\n## Usage\n\nWhile designed around the [EditorJS](https://github.com/codex-team/editor.js) API, the library may be used for just transforming HTML content into structured/block-based content for a variety of purposes\n\nThe conversion from HTML can be done as follows:\n\n```ts\nimport { convertHtmlToStructuredContent } from \"@sftsrv/structured-html\";\n\n// get some RAW HTML\nconst htmlText = \"\u003cp\u003ehello world\u003c/p\u003e\";\n\n// use the DOM to parse it from a string\nconst html = new DOMParser().parseFromString(htmlText, \"text/html\").body;\n\n// the convertHtmlToStructuredContent function takes an HTML ELement and returns the structured HTML content\nconst blocks = convertHtmlToStructuredContent(html);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsftsrv%2Fstructured-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsftsrv%2Fstructured-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsftsrv%2Fstructured-html/lists"}