{"id":13769530,"url":"https://github.com/wandersonsousa/header-with-alignment","last_synced_at":"2025-05-11T02:32:42.255Z","repository":{"id":50024704,"uuid":"518498966","full_name":"wandersonsousa/header-with-alignment","owner":"wandersonsousa","description":"Plugin to use header with alignment for editorjs","archived":false,"fork":false,"pushed_at":"2022-07-27T16:10:50.000Z","size":144,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T20:53:08.135Z","etag":null,"topics":["alignmentforeditorjs","editorheaderwithalign","editorjs","editorjsalignment","headerwithalignment"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/editorjs-header-with-alignment","language":"JavaScript","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/wandersonsousa.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}},"created_at":"2022-07-27T14:48:14.000Z","updated_at":"2025-01-17T12:10:10.000Z","dependencies_parsed_at":"2022-08-22T17:10:11.143Z","dependency_job_id":null,"html_url":"https://github.com/wandersonsousa/header-with-alignment","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/wandersonsousa%2Fheader-with-alignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersonsousa%2Fheader-with-alignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersonsousa%2Fheader-with-alignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandersonsousa%2Fheader-with-alignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wandersonsousa","download_url":"https://codeload.github.com/wandersonsousa/header-with-alignment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253507147,"owners_count":21919158,"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":["alignmentforeditorjs","editorheaderwithalign","editorjs","editorjsalignment","headerwithalignment"],"created_at":"2024-08-03T17:00:27.921Z","updated_at":"2025-05-11T02:32:41.900Z","avatar_url":"https://github.com/wandersonsousa.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["Block Tools"],"readme":"# Heading Tool\n\n![Version of EditorJS that the plugin is compatible with](https://badgen.net/badge/Editor.js/v2.0/blue)\n\nProvides Headings Blocks for the [Editor.js](https://ifmo.su/editor).\n\n## Installation\n\n### Install via NPM\n\nGet the package\n\n```shell\nnpm i --save editorjs-header-with-alignment\n```\n\nInclude module at your application\n\n```javascript\nconst Header = require(\"editorjs-header-with-alignment\");\n```\n\n### Download to your project's source dir\n\n1. Upload folder `dist` from repository\n2. Add `dist/bundle.js` file to your page.\n\n## Usage\n\nAdd a new Tool to the `tools` property of the Editor.js initial config.\n\n```javascript\nvar editor = EditorJS({\n  ...\n\n  tools: {\n    ...\n    header: Header,\n  },\n\n  ...\n});\n```\n\n## Config Params\n\nAll properties are optional.\n\n| Field            | Type       | Description                 |\n| ---------------- | ---------- | --------------------------- |\n| placeholder      | `string`   | header's placeholder string |\n| levels           | `number[]` | enabled heading levels      |\n| defaultLevel     | `number`   | default heading level       |\n| defaultAlignment | `string`   | default alignment level     |\n\n```javascript\nvar editor = EditorJS({\n  ...\n\n  tools: {\n    ...\n    header: {\n      class: Header,\n      config: {\n        placeholder: 'Enter a header',\n        levels: [2, 3, 4],\n        defaultLevel: 3,\n        defaultAlignment: 'left'\n      }\n    }\n  }\n\n  ...\n});\n```\n\n## Output data\n\n| Field | Type     | Description                                          |\n| ----- | -------- | ---------------------------------------------------- |\n| text  | `string` | header's text                                        |\n| level | `number` | level of header: 1 for H1, 2 for H2 ... 6 for H6     |\n| align | `string` | heder alignment: 'left', 'center', 'justify', 'right |\n\n```json\n{\n  \"type\": \"header\",\n  \"data\": {\n    \"text\": \"Why Telegram is the best messenger\",\n    \"level\": 2,\n    \"align\": \"left\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandersonsousa%2Fheader-with-alignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwandersonsousa%2Fheader-with-alignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandersonsousa%2Fheader-with-alignment/lists"}