{"id":13430011,"url":"https://github.com/ritz078/embed-js","last_synced_at":"2025-12-12T04:06:32.100Z","repository":{"id":27756867,"uuid":"31244986","full_name":"ritz078/embed-js","owner":"ritz078","description":"🌻  A lightweight plugin to embed emojis, media, maps, tweets, code and more. ✨","archived":false,"fork":false,"pushed_at":"2022-07-07T03:40:45.000Z","size":69324,"stargazers_count":1268,"open_issues_count":16,"forks_count":89,"subscribers_count":34,"default_branch":"v5","last_synced_at":"2025-11-20T04:11:07.457Z","etag":null,"topics":["emoji","javascript-plugin","tweets"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/s/Wp5OlNMn","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/ritz078.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"paypal.me/ritz078"}},"created_at":"2015-02-24T04:43:55.000Z","updated_at":"2025-11-04T18:27:59.000Z","dependencies_parsed_at":"2022-07-30T07:38:02.991Z","dependency_job_id":null,"html_url":"https://github.com/ritz078/embed-js","commit_stats":null,"previous_names":["ritz078/embed.js","ritz078/emoticons-js"],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/ritz078/embed-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritz078%2Fembed-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritz078%2Fembed-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritz078%2Fembed-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritz078%2Fembed-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ritz078","download_url":"https://codeload.github.com/ritz078/embed-js/tar.gz/refs/heads/v5","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritz078%2Fembed-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27650469,"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-12-10T02:00:12.818Z","response_time":54,"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":["emoji","javascript-plugin","tweets"],"created_at":"2024-07-31T02:00:49.166Z","updated_at":"2025-12-12T04:06:31.786Z","avatar_url":"https://github.com/ritz078.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"resources/logo.png\" align=\"center\" alt=\"\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/ritz078/embed-js\"\u003e\n\u003cimg src=\"https://travis-ci.org/ritz078/embed-js.svg?branch=master\" alt=\"Build Status\" style=\"max-width:100%;\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ritz078/embed-js\"\u003e\n\u003cimg src=\"https://img.shields.io/npm/v/embed-js.svg\" alt=\"npm\" style=\"max-width:100%;\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/intent/tweet?text=embed-js+%7C+A+JS+plugin+to+embed+emojis%2C+media%2C+maps%2C+tweets%2C+code%2C+services+and+parse+markdown+http%3A%2F%2Fbit.ly%2F1NIvT8A\u0026amp;url='http%3A%2F%2Fbit.ly%2F1NIvT8A'\u0026amp;hashtags=JavaScript\"\u003e\n\u003cimg src=\"https://img.shields.io/twitter/url/https/github.com/ritz078/embed-js.svg?style=social\" alt=\"Twitter\" style=\"max-width:100%;\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003e A lightweight JavaScript plugin to embed emojis, media, maps, tweets, code and services.\n\n**This is the documentation for v5. If you are looking for docs of v4 you can get them** [here](https://embedjs.readme.io/docs).\n\n[![Edit embed.js - demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/Wp5OlNMn)\n\n## Features\n-   **Supported:** supports IE8+ (assuming `Promise` is polyfilled)\n-   **Plugin Based:** only load what you want.\n-   **Isomorphic**: Can be used both on server and client side.\n-   **Customizable**: So much that creating a custom plugin is also few lines of code.\n-   **Modern:** written in ES2015\n\n## Contents\n- [Installation](#installation)\n- [Basic Usage](#basic-usage)\n- [Options](#options)\n- [Plugins](#plugins)\n\t- [url](./packages/embed-plugin-url)\n\t- [emoji](./packages/embed-plugin-emoji)\n\t- [Media](./packages/embed-plugin-media)\n\t- [highlight](./packages/embed-plugin-highlight)\n\t- [github](./packages/embed-plugin-github)\n\t- [youtube](./packages/embed-plugin-youtube)\n\t- [facebook](./packages/embed-plugin-facebook)\n\t- [map](./packages/embed-plugin-map)\n\t- [noembed](./packages/embed-plugin-noembed)\n\t- [Twitter](./packages/embed-plugin-twitter)\n\t- [Instagram](./packages/embed-plugin-instagram)\n- [Presets](#presets)\n\t- [basic](./packages/embed-preset-basic)\n\n## Installation\n\nTo install the stable version:\n```\nnpm install --save embed-js\n```\n## CDN\nhttps://unpkg.com/embed-js\n\n## Basic Usage\n\n**You need to use plugins or presets to do anything. By default embed-js does nothing.**\n\nLet's assume that the HTML structure is as written below\n\n``` html\n\u003cdiv id=\"element\"\u003e\n   \u003c!--===== your string here =======--\u003e\n\u003c/div\u003e\n```\n\nCreating an instance of embed.js\n\n``` javascript\nimport EmbedJS from 'embed-js'\nimport url from 'embed-plugin-url'\nimport emoji from 'embed-plugin-emoji'\n\nconst x = new EmbedJS({\n  input: document.getElementById('element'),\n  plugins: [\n    url(),\n    emoji()\n  ]\n})\n```\n\nNext step is replacing the original text with the processed text.\n\n``` javascript\n//Render the result\nx.render();\n```\n\nThere may be cases where you just want the processed string to use it according to your need. You can get it by the following method. This can\nbe used on the server side to get the string. Still if the plugin involves interactions, you will have to load it on\nthe client side.\n\n``` javascript\n//Get the resulting string\nx.text().then(({ result }) =\u003e {\n  console.log(result); //The resulting string\n})\n```\n\nIf you wan't to destroy the instance. It will also replace the processed string with the original string.\n\n``` javascript\n//Destroy the instance\nx.destroy()\n```\n\n## Options\n\noption|default|Description\n------|-------|-----------\n**plugins**|[]|Accepts an array of plugins.\n**preset**| null | Accepts a preset. Currently accpets only one preset. It can be combined with plugins.\n**inlineEmbed**| true | If case you want to to embed contents at the end of texts, turn this to false.\n**replaceUrl**| false | Useful when __inlineEmbed__ is set to true. Replace text with the embed.\n**fetch**| `window.fetch` or `window.unfetch` | If you are willing to use the library on both server and client side you need to pass an isomorphic fetch library like [isomorphic-unfetch](https://github.com/developit/unfetch/tree/master/packages/isomorphic-unfetch) or [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). This is only needed if you are using a plugin that has to make a HTTP request.\n\n\n## Development\n1. Fork the repo\n1. clone the repo then `cd embed.js`\n1. create a new branch\n1. Then `npm install \u0026\u0026 yarn build:watch`\n1. Create a PR\n\n**Note**: This projects adheres to a [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nMIT \u0026copy; [Ritesh Kumar](https://github.com/ritz078)\n","funding_links":["paypal.me/ritz078"],"categories":["CSS","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritz078%2Fembed-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fritz078%2Fembed-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritz078%2Fembed-js/lists"}