{"id":18064486,"url":"https://github.com/archonic/ckeditor5-self-image","last_synced_at":"2025-04-11T18:11:13.776Z","repository":{"id":48362659,"uuid":"150900946","full_name":"archonic/ckeditor5-self-image","owner":"archonic","description":"Image upload plugin matching the API of EasyImage.","archived":false,"fork":false,"pushed_at":"2021-07-29T22:59:57.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T14:05:58.608Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archonic.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":"2018-09-29T20:33:35.000Z","updated_at":"2021-07-29T22:59:46.000Z","dependencies_parsed_at":"2022-09-05T15:10:12.960Z","dependency_job_id":null,"html_url":"https://github.com/archonic/ckeditor5-self-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/archonic%2Fckeditor5-self-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Fckeditor5-self-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Fckeditor5-self-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archonic%2Fckeditor5-self-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archonic","download_url":"https://codeload.github.com/archonic/ckeditor5-self-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456364,"owners_count":21106603,"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-10-31T06:06:33.848Z","updated_at":"2025-04-11T18:11:13.758Z","avatar_url":"https://github.com/archonic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CKEditor5 Self Image\n\nSelf Image replicates the API of EasyImage which makes it easier to switch to an upload solution you host yourself. Originally forked from [ckeditor5-simple-upload](https://github.com/pourquoi/ckeditor5-simple-upload).\n\nFor CKEditor5 v11 use 0.0.1\nFor CKEditor5 v12 use 0.0.2\nFor CKEditor5 v16 use 0.0.3\n\n```\nnpm install ckeditor5-self-image\n```\n\nAdd this plugin and remove the ckfinder and easyimage plugins. The toolbar item entry stays as `imageUpload`.\n\n```javascript\n// src/ckeditor.js\n\nimport UploadAdapter from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';\nimport Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';\nimport Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\nimport Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\nimport BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';\n//import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';\n//import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';\nimport SelfImage from 'ckeditor5-self-image/src/selfimage';\n\n// ...\n\n// Plugins to include in the build.\nClassicEditor.builtinPlugins = [\n\tEssentials,\n\tUploadAdapter,\n\tAutoformat,\n\tBold,\n\tItalic,\n\tBlockQuote,\n  // CKFinder,\n  // EasyImage,\n\tHeading,\n  Image,\n  SelfImage\n  // ...\n]\n\nClassicEditor.defaultConfig = {\n\ttoolbar: {\n\t\titems: [\n\t\t\t'heading',\n\t\t\t'|',\n\t\t\t'bold',\n\t\t\t'italic',\n\t\t\t'link',\n\t\t\t'bulletedList',\n\t\t\t'numberedList',\n\t\t\t'imageUpload',\n\t\t\t'blockQuote',\n\t\t\t'insertTable',\n\t\t\t'mediaEmbed',\n\t\t\t'undo',\n\t\t\t'redo'\n\t\t]\n  },\n\n  // ...\n}\n\n### Configuration\n\n```javascript\nClassicEditor.create(document.querySelector( '#editor' ), {\n  selfUpload: {\n    uploadUrl: 'http://127.0.0.1/my-upload-endpoint'\n  }\n})\n```\n\n```javascript\nvar cb = function() { return (new Date()).getTime() }\nClassicEditor.create(document.querySelector( '#editor' ), {\n  selfUpload: {\n    uploadUrl: { url:'http://127.0.0.1/my-upload-endpoint', headers:{ 'x-header':'myhead', 'x-header-cb': cb } }\n  }\n})\n```\n\n### Backend\n\nThe endpoint will receive a file named **file** and should return the image url with the key **url**.\n\nsuccess response :\n```json\n{\n  \"uploaded\": true,\n  \"url\": \"http://127.0.0.1/uploaded-image.jpeg\"\n}\n```\n\nfailure response :\n```json\n{\n  \"uploaded\": false,\n  \"error\": {\n    \"message\": \"could not upload this image\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchonic%2Fckeditor5-self-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchonic%2Fckeditor5-self-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchonic%2Fckeditor5-self-image/lists"}