{"id":13769682,"url":"https://github.com/PaulKinlan/simple-image","last_synced_at":"2025-05-11T02:33:19.534Z","repository":{"id":44016997,"uuid":"232529068","full_name":"PaulKinlan/simple-image","owner":"PaulKinlan","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-04T13:53:34.000Z","size":3937,"stargazers_count":11,"open_issues_count":15,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-20T03:41:05.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PaulKinlan.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":"2020-01-08T09:40:09.000Z","updated_at":"2024-07-03T03:57:45.000Z","dependencies_parsed_at":"2023-02-02T14:46:05.561Z","dependency_job_id":null,"html_url":"https://github.com/PaulKinlan/simple-image","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/PaulKinlan%2Fsimple-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulKinlan%2Fsimple-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulKinlan%2Fsimple-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulKinlan%2Fsimple-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulKinlan","download_url":"https://codeload.github.com/PaulKinlan/simple-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213832257,"owners_count":15644968,"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:30.437Z","updated_at":"2024-08-03T17:02:27.987Z","avatar_url":"https://github.com/PaulKinlan.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["Block Tools"],"readme":"Note: This is a fork of the SimpleImage repository. It adds in extra functionality such as a toolbar to add images (rather than just drag and drop) and uses blob URL's\nto improve memory usage.\n\n# Simple Image Tool\n\nProvides Image Blocks for the [Editor.js](https://editorjs.io).\n\nWorks only with pasted image URLs and requires no server-side uploader.\n\n![](assets/image-uploading.gif)\n\n## Installation\n\n### Install via NPM\n\nGet the package\n\n```shell\nnpm i --save-dev simple-image-editorjs\n```\n\nInclude module at your application\n\n```javascript\nconst SimpleImage = require('simple-image-editorjs');\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### Load from CDN\n\nYou can load specific version of package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/simple-image-editorjs).\n\n`https://cdn.jsdelivr.net/npm/simple-image-editorjs@latest`\n\nThen require this script on page with Editor.js.\n\n```html\n\u003cscript src=\"...\"\u003e\u003c/script\u003e\n```\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    image: SimpleImage,\n  }\n  \n  ...\n});\n```\n\n## Config Params\n\nThis Tool has no config params\n\n## Tool's settings\n\n![](https://capella.pics/c74cdeec-3405-48ac-a960-f784188cf9b4.jpg)\n\n1. Add border\n\n2. Stretch to full-width\n\n3. Add background\n\n## Output data\n\n| Field          | Type      | Description                     |\n| -------------- | --------- | ------------------------------- |\n| url            | `string`  | image's url                     |\n| caption        | `string`  | image's caption                 |\n| withBorder     | `boolean` | add border to image             |\n| withBackground | `boolean` | need to add background          |\n| stretched      | `boolean` | stretch image to screen's width |\n\n\n```json\n{\n    \"type\" : \"image\",\n    \"data\" : {\n        \"url\" : \"https://www.tesla.com/tesla_theme/assets/img/_vehicle_redesign/roadster_and_semi/roadster/hero.jpg\",\n        \"caption\" : \"Roadster // tesla.com\",\n        \"withBorder\" : false,\n        \"withBackground\" : false,\n        \"stretched\" : true\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulKinlan%2Fsimple-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaulKinlan%2Fsimple-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulKinlan%2Fsimple-image/lists"}