{"id":20473986,"url":"https://github.com/pecuchet/m-embed","last_synced_at":"2025-10-13T23:40:01.670Z","repository":{"id":101896701,"uuid":"46224648","full_name":"pecuchet/m-embed","owner":"pecuchet","description":"Web embeds for MediumEditor","archived":false,"fork":false,"pushed_at":"2016-09-06T14:56:56.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T23:40:01.329Z","etag":null,"topics":["medium-editor","web-embed"],"latest_commit_sha":null,"homepage":"http://pecuchet.github.io/m-embed","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/pecuchet.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-15T16:01:26.000Z","updated_at":"2017-08-15T12:04:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab43c724-6e82-4ce2-be88-d96451a5fbcf","html_url":"https://github.com/pecuchet/m-embed","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"1c4861cacb8291b30cdb1d88ceefbead298ebd0a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pecuchet/m-embed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecuchet%2Fm-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecuchet%2Fm-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecuchet%2Fm-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecuchet%2Fm-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pecuchet","download_url":"https://codeload.github.com/pecuchet/m-embed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pecuchet%2Fm-embed/sbom","scorecard":{"id":725953,"data":{"date":"2025-08-18","repo":{"name":"github.com/pecuchet/m-embed","commit":"1c4861cacb8291b30cdb1d88ceefbead298ebd0a"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T12:49:03.628Z","repository_id":101896701,"created_at":"2025-08-22T12:49:03.628Z","updated_at":"2025-08-22T12:49:03.628Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017233,"owners_count":26086016,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["medium-editor","web-embed"],"created_at":"2024-11-15T14:27:25.572Z","updated_at":"2025-10-13T23:40:01.643Z","avatar_url":"https://github.com/pecuchet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# M-Embed for MediumEditor\nM-Embed is a [MediumEditor](https://github.com/daviferreira/medium-editor) extension to embed URL previews with [Embedly](http://embed.ly)'s API in your contenteditable editor. Once embedded, you can choose between the multiple media (images, iframes) returned for the URL. M-Embed has been written using vanilla JavaScript, no additional frameworks are required.\n\n## Demo\n[Here is a demo](http://pecuchet.github.io/m-embed) (using predefined data\u0026mdash;without making a request to Embedly, which would require an API key. Embedly has free and paid plans to access their API.)\n\n## Installation\n**Via npm:**  \nRun in your console: `npm install m-embed`\n\n\u003cbr\u003e\n**Manual installation:**  \nDownload and reference MediumEditor and M-Embed along with their stylesheets. No other dependencies are necessary.\n```\n\u003cscript src=\"js/medium-editor.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/medium-editor-m-embed.min.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"css/medium-editor.css\"\u003e \u003c!-- MediumEditor --\u003e\n\u003clink rel=\"stylesheet\" href=\"css/medium-editor-m-embed.css\"\u003e \u003c!-- M-Embed --\u003e\n\u003clink rel=\"stylesheet\" href=\"css/themes/default.css\"\u003e \u003c!-- or any other theme --\u003e\n```\n\n\n## Usage\nUpon instantiation of the editor, instantiate the extension in the `extensions` property, reference the button in the `toolbar` \u003e `buttons` array.\n\n```\nvar editor = new MediumEditor('.editable', {\n    mEmbed : {\n        // options for m-embed \n    },\n    toolbar: {\n      buttons: [\n          // other toolbar buttons\n          'mEmbed'\n      ]\n    },\n    extensions: {\n        // other MediumEditor extensions\n        mEmbed: new MEmbed()\n    }\n});\n```\n\n## Options\nThe following options, and their defaults, are available to customize M-Embed. The options object is passed as a property named `mEmbed` when you instantiate MediumEditor.\n\n\u003cbr\u003e\n**Embedly options:**  \n\n- **key** Your Embedly API key. Default: `null`\n- **fakeData** For testing purposes, the API key requirement will be bypassed. Default: `null`\n- **endpoint** API endpoint (see [Embedly](http://embed.ly/docs/api/embed/arguments)). Default: `'extract'`\n- **secure** http(s) (see [Embedly](http://embed.ly/docs/api/embed/arguments)). Default: `undefined`\n- **query** (see [Embedly](http://embed.ly/docs/api/embed/arguments)). Default: `{}`\n- **urlRe** Additional regular expression to test the URL against, just before the XHR call. Default: `undefined`\n\n\u003cbr\u003e\n**Preview options:**  \n\n- **allowMultiple** Allow multiple embeds per editor. Default: `false`\n- **displayErrors** Display errors in the editor (they are also emitted through an event). Default: `true`\n- **linkTarget** The embed link target. Default: `'_blank'`\n- **hideToolbarAfter** Hide the toolbar after embedding. Default: `true` \n- **deselectAfter** Deselect the url after embedding. Default: `true`\n- **thumbnailSize** Images smaller than 300 will trigger a 'thumbnail' class on the main element. Default: `300`\n- **thumbnailMini** Size at which to add class 'mini' on the image div. Default: `100`\n\n## Events\n\n**Triggered:**  \n\n- **m-embed:error** Request validation, xhr \u0026 general errors — { msg, error }\n- **m-embed:success** Successful request — { response }\n- **m-embed:progress** Request progress — { msg: percentage }\n- **m-embed:media** Included media (picture, video), fired on render and on user choice — { media }\n- **m-embed:no-media** User has removed media from preview\n- **m-embed:removed** Embed has been removed entirely\n\n\u003cbr\u003e\n**Subscribed to:**\n\n- **m-embed:cleanup** Remove all non content clutter \u0026mdash; pass in the editor element\n- **m-embed:revive** Reapply the ui for an existing preview \u0026mdash; pass in the editor element\n- **m-embed:swap** Replace the media with another image \u0026mdash; pass in { mime: '', url: '' } and the editor element","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpecuchet%2Fm-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpecuchet%2Fm-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpecuchet%2Fm-embed/lists"}