{"id":13770774,"url":"https://github.com/Archakov06/codex-to-html","last_synced_at":"2025-05-11T03:32:53.596Z","repository":{"id":43746657,"uuid":"166716593","full_name":"Archakov06/codex-to-html","owner":"Archakov06","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-14T16:35:36.000Z","size":5,"stargazers_count":15,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T02:41:23.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Archakov06.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}},"created_at":"2019-01-20T22:32:46.000Z","updated_at":"2024-07-22T11:29:48.000Z","dependencies_parsed_at":"2022-07-20T19:02:10.603Z","dependency_job_id":null,"html_url":"https://github.com/Archakov06/codex-to-html","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fcodex-to-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fcodex-to-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fcodex-to-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fcodex-to-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Archakov06","download_url":"https://codeload.github.com/Archakov06/codex-to-html/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:41.884Z","updated_at":"2025-05-11T03:32:53.370Z","avatar_url":"https://github.com/Archakov06.png","language":"PHP","funding_links":[],"categories":["Libraries"],"sub_categories":["PHP"],"readme":"# Codex To HTML\n\nClass for converting JSON-blocks EditorJS to HTML.\n\n## How to use?\n\nCreate an instance of the class with prepared settings for each block and call the `render` method  (put JSON-blocks).\n\n## Example\n\n```php\n\u003c?php\nrequire './codex.php';\n\n$codex = new CodexToHtml([\n    'raw' =\u003e function($html) {\n        return $html;\n    },\n    'header' =\u003e function($text, $level) {\n        return \"\u003ch${level}\u003e${text}\u003c/h${level}\u003e\";\n    },\n    'paragraph' =\u003e function($text) {\n        return \"\u003cp\u003e{$text}\u003c/p\u003e\";\n    },\n    'image' =\u003e function($file, $caption, $widthBorder, $stretched, $withBackground) {\n        return \"\u003cimg src=\\\"{$file['url']}\\\" title=\\\"{$caption}\\\" alt=\\\"{$caption}\\\"\u003e\";\n    },\n]);\n\n// $blocks - JSON состоящий из блоков-компонентов Codex Editor\n\n$codex-\u003erender($blocks);\n\n```\n\n## License\n\nMIT © [Archakov Dennis](https://github.com/Archakov06)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArchakov06%2Fcodex-to-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FArchakov06%2Fcodex-to-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArchakov06%2Fcodex-to-html/lists"}