{"id":13770394,"url":"https://github.com/VolgaIgor/editorjs-notice","last_synced_at":"2025-05-11T03:32:44.071Z","repository":{"id":49327371,"uuid":"517336845","full_name":"VolgaIgor/editorjs-notice","owner":"VolgaIgor","description":"Notice with caption for any Editor.js block","archived":false,"fork":false,"pushed_at":"2024-09-03T13:30:43.000Z","size":117,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T21:50:12.253Z","etag":null,"topics":["editorjs","editorjs-plugin"],"latest_commit_sha":null,"homepage":"","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/VolgaIgor.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,"publiccode":null,"codemeta":null}},"created_at":"2022-07-24T13:50:35.000Z","updated_at":"2024-10-07T23:42:40.000Z","dependencies_parsed_at":"2024-11-17T06:34:07.212Z","dependency_job_id":"3fb791f7-6812-4523-af34-c9f34cd8ab69","html_url":"https://github.com/VolgaIgor/editorjs-notice","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolgaIgor%2Feditorjs-notice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolgaIgor%2Feditorjs-notice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolgaIgor%2Feditorjs-notice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolgaIgor%2Feditorjs-notice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VolgaIgor","download_url":"https://codeload.github.com/VolgaIgor/editorjs-notice/tar.gz/refs/heads/main","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":["editorjs","editorjs-plugin"],"created_at":"2024-08-03T17:00:36.870Z","updated_at":"2025-05-11T03:32:43.741Z","avatar_url":"https://github.com/VolgaIgor.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["Block Tune Tools"],"readme":"# Notice with caption Block Tune for Editor.js\nTune for Editor.js adding color notice with caption for any block.\n\nCaption field will be shown only for the first block of one type.\n\n![Preview image](https://github.com/VolgaIgor/editorjs-notice/raw/main/assets/preview.png)\n\n## Installation\n### Install via NPM\nGet the package\n\n```shell\n$ npm i editorjs-notice\n```\n\nInclude module at your application\n\n```javascript\nimport NoticeTune from 'editorjs-notice';\n```\n\n### Load from CDN\n\nYou can load a specific version of the package from jsDelivr CDN.\n\nRequire this script on a page with Editor.js.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/editorjs-notice\"\u003e\u003c/script\u003e\n```\n\n### Download to your project's source dir\n1. Upload folder `dist` from repository\n2. Add `dist/bundle.js` file to your page.\n\n## Usage\n### For all blocks\n```javascript\nvar editor = EditorJS({\n  // ...\n  tools: {\n    // ...\n    noticeTune: NoticeTune\n  },\n  tunes: ['noticeTune']\n  // ...\n});\n```\n\n### For certain blocks\n```javascript\nvar editor = EditorJS({\n  // ...\n  tools: {\n    // ...\n    noticeTune: NoticeTune,\n    header: {\n      class: Header,\n      tunes: ['noticeTune']\n    }\n  }\n  // ...\n});\n```\n\n## Config Params\nYou can add a localized string into notice caption placeholder\n```javascript\nnew Editorjs({\n  // ...\n  tools: {\n    noticeTune: NoticeTune\n  },\n  i18n: {\n    tools: {\n      noticeTune: {\n        'Notice caption': 'Заголовок'\n      }\n    }\n  },\n})\n```\n\n## Output data\nIf style is not set, then the tune data will not be serialized into JSON.\nAlso data returns in this format:\n| Field | Type     | Description        |\n| ----- | -------- | ------------------ |\n| style | `string` | (`spoiler` or `info` or `warning`) Notice style |\n| caption | `string` | Notice caption |\n\n```json\n{\n  // Block data\n  \"tunes\": {\n    \"noticeTune\": {\n      \"style\": \"spoiler\",\n      \"caption\": \"Hidden content\"\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVolgaIgor%2Feditorjs-notice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVolgaIgor%2Feditorjs-notice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVolgaIgor%2Feditorjs-notice/lists"}