{"id":23207080,"url":"https://github.com/aitorllj93/ngx-codex","last_synced_at":"2025-04-05T11:17:02.844Z","repository":{"id":38460256,"uuid":"250880913","full_name":"aitorllj93/ngx-codex","owner":"aitorllj93","description":"Angular editor.js component with custom components support.","archived":false,"fork":false,"pushed_at":"2023-03-01T02:40:09.000Z","size":4710,"stargazers_count":0,"open_issues_count":17,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T17:18:42.149Z","etag":null,"topics":["angular","editorjs"],"latest_commit_sha":null,"homepage":"https://d3v0ps.github.io/ngx-codex","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aitorllj93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["d3v0ps"]}},"created_at":"2020-03-28T19:52:48.000Z","updated_at":"2022-02-12T11:57:23.000Z","dependencies_parsed_at":"2023-02-05T01:02:43.082Z","dependency_job_id":null,"html_url":"https://github.com/aitorllj93/ngx-codex","commit_stats":null,"previous_names":["d3v0ps/ngx-codex"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aitorllj93%2Fngx-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aitorllj93%2Fngx-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aitorllj93%2Fngx-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aitorllj93%2Fngx-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aitorllj93","download_url":"https://codeload.github.com/aitorllj93/ngx-codex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325696,"owners_count":20920715,"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":["angular","editorjs"],"created_at":"2024-12-18T17:17:38.993Z","updated_at":"2025-04-05T11:17:02.823Z","avatar_url":"https://github.com/aitorllj93.png","language":"HTML","funding_links":["https://github.com/sponsors/d3v0ps"],"categories":[],"sub_categories":[],"readme":"# ngx-codex\n\n[![npm](https://img.shields.io/npm/v/ngx-codex)](https://www.npmjs.com/package/ngx-codex)\n[![demo](https://img.shields.io/badge/-demo-ff69b4)](https://d3v0ps.github.io/ngx-codex)\n\nAngular [editor.js](https://editorjs.io/) component with ControlValueAccesorTool Support.\n\nImplements `ControlValueAccesor`.\n\n[Demo](https://d3v0ps.github.io/ngx-codex)\n\n## Getting Started\n\n### 1. Install packages\n```sh\nnpm i @editorjs/editorjs\nnpm i ngx-codex\n```\n\n### 2. Import Module\n```typescript\nimport { NgxCodexModule } from 'ngx-codex';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [\n    FormsModule,\n    NgxCodexModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n```\n\n### 3. Load editor.js tools\n\n```typescript\n\nimport Header from '@editorjs/header';\n\nconst myEditorTools = {\n  header: {\n    class: Header,\n    shortcut: 'CMD+SHIFT+H',\n    config: {\n      placeholder: 'Enter a header'\n    }\n  }\n}\n```\n\n### 4. Include the component\n\n```html\n\u003cngx-codex [(ngModel)]=\"myEditorValueModel\"\n  [tools]=\"myEditorTools\"\u003e\n\u003c/ngx-codex\u003e\n```\n\n## Inputs\n\n| name | description |\n| ---- | ----------- |\n| tools | EditorJS Tools. [See editor.js configuration](https://editorjs.io/configuration) |\n\n## Tips\n\n### Loading Angular Components\n\n```ts\nimport { Component, ComponentFactoryResolver, ViewContainerRef } from '@angular/core';\n\nimport { ControlValueAccesorTool } from 'ngx-codex';\nimport { NgxBPMNModelerComponent } from 'ngx-bpmn-modeler';\n\nexport class BPMNTool extends ControlValueAccesorTool {\n\n  static get toolbox() {\n    return {\n      title: 'BPMN',\n      icon: `\n      \u003csvg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"\u003e\n        \u003cpath fill=\"#707684\" d=\"M6.27 17.05C6.72 17.58 7 18.25 7 19C7 20.66 5.66 22 4 22S1 20.66 1 19 2.34 16 4 16C4.18 16 4.36 16 4.53 16.05L7.6 10.69L5.86 9.7L9.95 8.58L11.07 12.67L9.33 11.68L6.27 17.05M20 16C18.7 16 17.6 16.84 17.18 18H11V16L8 19L11 22V20H17.18C17.6 21.16 18.7 22 20 22C21.66 22 23 20.66 23 19S21.66 16 20 16M12 8C12.18 8 12.36 8 12.53 7.95L15.6 13.31L13.86 14.3L17.95 15.42L19.07 11.33L17.33 12.32L14.27 6.95C14.72 6.42 15 5.75 15 5C15 3.34 13.66 2 12 2S9 3.34 9 5 10.34 8 12 8Z\" /\u003e\n      \u003c/svg\u003e\n      `\n    };\n  }\n\n}\n\n\n@Component({\n  selector: 'app-root',\n  template: `\n    \u003cngx-codex\n      [ngModel]=\"codex.content\"\n      [tools]=\"codex.tools\"\u003e\n    \u003c/ngx-codex\u003e\n  `\n})\nexport class AppComponent {\n  title = 'testing';\n\n  codex = {\n    content: null,\n    tools: {\n      bpmn: {\n        class: BPMNTool,\n        config: {\n          getFactoryResolver: () =\u003e this.factoryResolver,\n          getContainerRef: () =\u003e this.containerRef,\n          component: BPMNModelerComponent,\n          inputs: {\n            wrapperClass: 'bpmn-wrapper',\n            containerClass: 'bpmn-container',\n            propertiesClass: 'bpmn-properties'\n          }\n        }\n      },\n    }\n  };\n\n  constructor(\n    private factoryResolver: ComponentFactoryResolver,\n    private containerRef: ViewContainerRef,\n  ) {}\n}\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faitorllj93%2Fngx-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faitorllj93%2Fngx-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faitorllj93%2Fngx-codex/lists"}