{"id":40524302,"url":"https://github.com/the-grid/ed","last_synced_at":"2026-01-20T21:31:33.359Z","repository":{"id":57165837,"uuid":"44748076","full_name":"the-grid/ed","owner":"the-grid","description":"Text editing with media widgets","archived":false,"fork":false,"pushed_at":"2017-02-21T18:01:18.000Z","size":3157,"stargazers_count":61,"open_issues_count":29,"forks_count":7,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-10-17T09:10:51.026Z","etag":null,"topics":["contenteditable","editor","prosemirror","wysiwyg"],"latest_commit_sha":null,"homepage":"https://the-grid.github.io/ed/#fixture","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/the-grid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2015-10-22T13:47:51.000Z","updated_at":"2023-06-29T01:19:34.000Z","dependencies_parsed_at":"2022-08-30T15:10:29.788Z","dependency_job_id":null,"html_url":"https://github.com/the-grid/ed","commit_stats":null,"previous_names":[],"tags_count":157,"template":false,"template_full_name":null,"purl":"pkg:github/the-grid/ed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-grid%2Fed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-grid%2Fed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-grid%2Fed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-grid%2Fed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-grid","download_url":"https://codeload.github.com/the-grid/ed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-grid%2Fed/sbom","scorecard":{"id":877108,"data":{"date":"2025-08-11","repo":{"name":"github.com/the-grid/ed","commit":"5b10756ef84dc4eb18ee93d7e87bbc097c61f082"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T06:27:37.949Z","repository_id":57165837,"created_at":"2025-08-24T06:27:37.949Z","updated_at":"2025-08-24T06:27:37.949Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28614570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["contenteditable","editor","prosemirror","wysiwyg"],"created_at":"2026-01-20T21:31:33.199Z","updated_at":"2026-01-20T21:31:33.353Z","avatar_url":"https://github.com/the-grid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"`npm start`\n\n# ed\n\n[![Build Status](https://travis-ci.org/the-grid/ed.svg?branch=master)](https://travis-ci.org/the-grid/ed)\n\nUsing [ProseMirror](http://prosemirror.net/) with data from [the Grid API](http://developer.thegrid.io/)\n\nDemo: [the-grid.github.io/ed/](https://the-grid.github.io/ed/), [with fixture](https://the-grid.github.io/ed/#fixture)\n\nThe demo shows translating from ProseMirror to the the Grid API JSON and back.\n\n## purpose\n\nProseMirror provides a high-level schema-based interface for interacting with `contenteditable`, taking care of that pain. Ed is focused on:\n\n* Schema to translate between the Grid API data and ProseMirror doc type\n* Coordinating widgets (block editors specialized by type) ([example](https://github.com/the-grid/ced))\n\n# use\n\n## Using as a React ⚛ component\n\nEd exposes [a React component](./src/components/app.js) by default.\n\n``` jsx\nimport Ed from '@the-grid/ed'\n\nexport default class PostEditor extends React.Component {\n  render() {\n    return (\n      \u003cEd key='item-uuid' initialContent={...} onChange={...} ... /\u003e\n    )\n  }\n}\n```\n\n## Using as a stand-alone library in iframe or similar\n\nIncluding `dist/build.js` in your page exposes `window.TheGridEd`\n\n``` html\n\u003cscript src='dist/build.js'\u003e\u003c/script\u003e\n```\n\nThere are `{mountApp, unmountApp}` helper methods\navailable to use like this:\n\n``` js\n  var container = document.querySelector('#ed')\n  window.TheGridEd.mountApp(container, {\n    // REQUIRED -- Content array from post\n    initialContent: [],\n    // OPTIONAL (default true) enable or disable the default menu\n    menuBar: true,\n    // REQUIRED -- Hit on every change\n    onChange: function () {\n      /* App can show \"unsaved changes\" in UI */\n    },\n    // REQUIRED\n    onShareFile: function (index) {\n      /* App triggers native file picker */\n      /* App calls ed.insertPlaceholders(index, count) and gets array of ids back */\n      /* App uploads files and sets status on placeholder blocks with ed.updateProgress */\n      /* On upload / measurement finishing, app replaces placeholder blocks with ed.setContent */\n    },\n    // REQUIRED\n    onRequestCoverUpload: function (id) {\n      /* Similar to onShareFile, but hit with block id instead of index */\n      /* App uploads files and sets status on blocks with ed.updateProgress */\n      /* Once upload is complete, app hits ed.setCoverSrc */\n    },\n    // REQUIRED\n    onShareUrl: function ({block, url}) {\n      /* Ed made the placeholder with block id */\n      /* App shares url with given block id */\n      /* App updates status on placeholder blocks with ed.updateProgress */\n      /* On share / measurement finishing, app replaces placeholder blocks with ed.setContent */\n    },\n    // REQUIRED\n    onPlaceholderCancel: function (id) {\n      /* Ed removed the placeholder if you call ed.getContent() now */\n      /* App should cancel the share or upload */\n    },\n    // OPTIONAL\n    onRequestLink: function (value) {\n      /*\n        If defined, Ed will _not_ show prompt for link\n        If selection is url-like, value will be the selected string\n        App can then call `ed.execCommand('link:toggle', {href, title})`\n          Note: If that is called while command 'link:toggle' is 'active', it will remove the link, not replace it\n      */\n    },\n    // OPTIONAL\n    onDropFiles: function (index, files) {\n      /* App calls ed.insertPlaceholders(index, files.length) and gets array of ids back */\n      /* App uploads files and sets status on placeholder blocks with ed.updateProgress */\n      /* On upload / measurement finishing, app replaces placeholder blocks with ed.setContent */\n    },\n    // OPTIONAL\n    onDropFileOnBlock: function (id, file) {\n      /* App uploads files and sets status on block with ed.updateProgress */\n      /* Once upload is complete, app hits ed.setCoverSrc */\n    },\n    // OPTIONAL\n    onMount: function (mounted) {\n      /* Called once PM and widgets are mounted */\n      window.ed = mounted\n    },\n    // OPTIONAL\n    onCommandsChanged: function (commands) {\n      /* Object with commandName keys and one of inactive, active, disabled */\n    },\n    // OPTIONAL -- imgflo image proxy config\n    imgfloConfig: {\n      server: 'https://imgflo.herokuapp.com/',\n      key: 'key',\n      secret: 'secret'\n    },\n    // OPTIONAL -- where iframe widgets live relative to app (or absolute)\n    widgetPath: './node_modules/',\n    // OPTIONAL -- site-wide settings to allow cover filter, crop, overlay; default true\n    coverPrefs: {\n      filter: false,\n      crop: true,\n      overlay: true\n    },\n    // OPTIONAL -- site or user flags to reduce functionality\n    featureFlags: {\n      edCta: false,\n      edEmbed: false\n    }\n  })\n  \n  // Returns array of inserted placeholder ids\n  ed.insertPlaceholders(index, count)\n  \n  // Update placeholder metadata\n  // {status (string), progress (number 0-100), failed (boolean)}\n  // metadata argument with {progress: null} will remove the progress bar\n  ed.updateProgress(id, metadata)\n  \n  // Once block cover upload completes\n  // `cover` is object with {src, width, height}\n  ed.setCover(id, cover)\n\n  // For placeholder or media block with uploading cover\n  // `src` should be blob: or data: url of a\n  // sized preview of the local image\n  ed.setCoverPreview(id, src)\n\n  // Returns content array\n  // Expensive, so best to debounce and not call this on every change\n  // Above the fold block is index 0, and starred\n  ed.getContent()\n  \n  // Only inserts/updates placeholder blocks and converts placeholder blocks to media\n  ed.setContent(contentArray)\n  \n  // Returns true if command applies successfully with current selection\n  ed.execCommand(commandName)\n```\n\nDemo: [./demo/demo.js](./demo/demo.js)\n\n## commands\n\nWith `onCommandsChanged` prop, app will get an object containing these commandName keys.\nValues will be one of these strings: `inactive`, `active`, `disabled`, `flagged`.\n\nApps can apply formatting / editing commands with `ed.execCommand(commandName)`\n\nSpecial case: `ed.execCommand('link:toggle', {href, title})` (title optional) to set link of current selection.\n\nSupported `commandName` keys:\n\n```\nstrong:toggle\nem:toggle\nlink:toggle\nparagraph:make\nheading:make1\nheading:make2\nheading:make3\nbullet_list:wrap\nordered_list:wrap\nhorizontal_rule:insert\nlift\nundo\nredo\ned_upload_image\ned_add_code\ned_add_location\ned_add_userhtml\ned_add_cta\ned_add_quote\n```\n\n# dev\n\n## server\n\n`npm start` and open [http://localhost:8080/](http://localhost:8080/)\n\nIn development mode, webpack builds and serves the targets in memory from /webpack/\n\nChanges will trigger a browser refresh.\n\n## plugins\n\n[Plugins](./src/plugins) are ES2015 classes with 2 required methods:\n\n* `constructor (ed) {}` gets a reference to the main `ed`, where you can\n  * listen to PM events: `ed.pm.on('draw', ...)`\n  * and set up UI: `ed.pluginContainer.appendChild(...)`\n* `teardown () {}` where all listeners and UI should be removed\n\n## widgets\n\nWidgets are mini-editors built to edit specific media types\n\n### iframe\n\nRun in iframe and communicate via postMessage \n\nExample: [ced - widget for code editing](https://github.com/the-grid/ced)\n\n### native\n\nExample: WIP\n\n## styling\n\n1. Primary: [Rebass](http://jxnblk.com/rebass/) defaults and [rebass-theme](./src/components/rebass-theme.js) for global overrides\n2. Secondary: inlined JS `style` objects ([example](./src/components/textarea-autosize.js))\n3. Deprecating: `require('./component-name.css')` style includes, but needed for some responsive hacks and ProseMirror overrides\n\n## code style\n\nFeross [standard](https://github.com/feross/standard#rules) checked by ESLint with `npm test` or `npm run lint`\n\n* no unneeded semicolons\n* no trailing spaces\n* single quotes\n\nTo automatically fix easy stuff like trailing whitespace: `npm run lintfix`\n\n## test\n\n`npm test`\n\n[Karma is set up](./karma.conf.js) to run tests in local Chrome and Firefox.\n\nTests will also run in mobile platforms via [BrowserStack](https://www.browserstack.com/), if you have these environment variables set up:\n\n```\nBROWSERSTACK_USERNAME\nBROWSERSTACK_ACCESSKEY\n```\n\n## build\n\n`npm run build`\n\nOutputs minified dist/ed.js and copies widgets defined in [package.json](./package.json).\n\n## deploying\n\n`npm version patch` - style tweaks, hot bug fixes\n\n`npm version minor` - adding features, backwards-compatible changes\n\n`npm version major` - removing features, non-backwards-compatible changes\n\nThese shortcuts will run tests, tag, change package version, and push changes and tags to GH.\n\nTravis will then publish new tags to [npm](https://www.npmjs.com/package/@the-grid/ed)\nand build the demo to publish to [gh-pages](https://the-grid.github.io/ed/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-grid%2Fed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-grid%2Fed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-grid%2Fed/lists"}