{"id":15060322,"url":"https://github.com/empress/ember-cli-showdown","last_synced_at":"2025-04-05T00:08:56.152Z","repository":{"id":19768597,"uuid":"23026631","full_name":"empress/ember-cli-showdown","owner":"empress","description":"Ember component to render markdown into HTML.","archived":false,"fork":false,"pushed_at":"2024-03-29T16:16:51.000Z","size":3014,"stargazers_count":101,"open_issues_count":8,"forks_count":35,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T23:07:12.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://empress.github.io/ember-cli-showdown/","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/empress.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2014-08-16T20:36:54.000Z","updated_at":"2024-04-17T21:18:44.000Z","dependencies_parsed_at":"2024-01-19T15:38:55.342Z","dependency_job_id":"caa3d76d-6481-4769-9c14-b9aff2fc0702","html_url":"https://github.com/empress/ember-cli-showdown","commit_stats":{"total_commits":176,"total_committers":24,"mean_commits":7.333333333333333,"dds":0.7159090909090908,"last_synced_commit":"c064ef112edfdaa4ceeaab18ec2ff9949f92666a"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empress%2Fember-cli-showdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empress%2Fember-cli-showdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empress%2Fember-cli-showdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/empress%2Fember-cli-showdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/empress","download_url":"https://codeload.github.com/empress/ember-cli-showdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266564,"owners_count":20910836,"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-09-24T22:56:48.076Z","updated_at":"2025-04-05T00:08:56.132Z","avatar_url":"https://github.com/empress.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-showdown\n\n[![Ember Observer Score](http://emberobserver.com/badges/ember-cli-showdown.svg)](http://emberobserver.com/addons/ember-cli-showdown)\n\nThis addon provides a component that transforms [Markdown](http://en.wikipedia.org/wiki/Markdown) into valid HTML.\n\n* Fastboot compatible\n\n## Compatibility\n\n* Ember.js v3.16 or above\n* Ember CLI v3.16 or above\n* Node.js v18 or above\n\n## Installation\n\n- `ember install ember-cli-showdown`\n\n## Usage\n\nPassing a markdown string inline:\n\n```handlebars\n\u003cMarkdownToHtml @markdown=\"#Markdown is cool [link](http://emberjs.com)\" /\u003e\n```\n\n```html\n\u003c!-- Output --\u003e\n\u003ch1\u003eMarkdown is cool \u003ca href=\"http://emberjs.com\"\u003elink\u003c/a\u003e\u003c/h1\u003e\n```\n\nYou can also pass a bound value:\n\n```handlebars\n\u003cMarkdownToHtml @markdown={{postContent}} /\u003e\n```\n\n### Showdown Options\n\nYou can use [configuration settings from Showdown][showdown-config]:\n\n```handlebars\n\u003cMarkdownToHtml\n  @markdown={{postContent}}\n  @strikethrough={{true}}\n  @literalMidWordUnderscores={{true}}\n  @simplifiedAutoLink={{true}}\n/\u003e\n```\n\n[showdown-config]: https://github.com/showdownjs/showdown#valid-options\n\n#### Global Showdown Options\n\nGlobal options are supported as of 2.11.x.  This lets you define options that will be used\nfor showdown options that were not provided as an attribute.\n\nAn example where you always want to auto link:\n\n```js\n// config/environment.js\nmodule.exports = function(environment) {\n  var ENV = {\n    showdown: {\n      simplifiedAutoLink: true\n    }\n  }\n\n  return ENV;\n}\n```\n\n### Showdown Extensions\n\nYou can load [Showdown Extensions](https://github.com/showdownjs/showdown/wiki/extensions) by specifying the\n\"extensions\" property when initializing your component:\n\n```handlebars\n\u003cMarkdownToHtml\n  @markdown={{postContent}}\n  @extensions={{myExtensionList}}\n/\u003e\n```\n\n```handlebars\n\u003cMarkdownToHtml\n  @markdown={{postContent}}\n  @extensions=\"foo bar baz\"\n/\u003e\n```\n\n(`myExtensionList` can be an array of strings or a space separated string)\n\nNote that you'll have to register your extensions with Showdown first.\nFor example, in an initializer:\n\n```js\n// app/initializers/register-showdown-extensions.js\nimport showdown from 'showdown';\n\nexport function initialize() {\n  showdown.extension(\"myExtensionName\", function() {\n    return [{\n      type: 'html',\n      regex: '\u003cblockquote\u003e',\n      replace: '\u003cblockquote class=\"blockquote\"\u003e'\n    }];\n  });\n}\n\nexport default {\n  name: 'register-showdown-extensions',\n  initialize\n};\n```\n\n[showdown-extensions]: https://github.com/showdownjs/showdown/wiki/extensions\n\n## 3.x to 4.3 migration\n\n* Global `showdown` is no longer supported.  Must be imported via `import showdown from 'showdown'`\n* Remove any use of `FastBoot.require('require')` with `import showdown from 'showdown'`\n\n## 7.x to 8.x migration\n\n* Positional parameters are no longer supported. Use the `@markdown` argument to provide the markdown content to `\u003cMarkdownToHtml /\u003e`.\n\n## Dependencies\n* [Showdown](https://github.com/showdownjs/showdown)\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fempress%2Fember-cli-showdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fempress%2Fember-cli-showdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fempress%2Fember-cli-showdown/lists"}