{"id":21094090,"url":"https://github.com/archakov06/codex-to-html","last_synced_at":"2025-05-16T14:32:45.655Z","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":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T06:40:26.915Z","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":225433466,"owners_count":17473599,"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-11-19T22:16:15.069Z","updated_at":"2024-11-19T22:16:15.690Z","avatar_url":"https://github.com/Archakov06.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"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"}