百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

ember-cli-showdown

> 编程语言
开源

用于将 Markdown 格式化为 HTML 的 Ember 组件。

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于将 Markdown 格式化为 HTML 的 Ember 组件。

ember-cli-showdown

This addon provides a component that transforms Markdown into valid HTML.

  • Fastboot compatible

Compatibility

  • Ember.js v3.28 or above
  • Embroider or ember-auto-import v2

Installation

  • ember install ember-cli-showdown

Usage

Passing a markdown string inline:

handlebars
xml

Markdown is cool link

You can also pass a bound value:

handlebars

Showdown Options

You can use configuration settings from Showdown:

handlebars

Global Showdown Options

Global options are supported as of 2.11.x. This lets you define options that will be used for showdown options that were not provided as an attribute.

An example where you always want to auto link:

javascript
// config/environment.js
module.exports = function (environment) {
  var ENV = {
    showdown: {
      simplifiedAutoLink: true,
    },
  };

  return ENV;
};

Showdown Extensions

You can load Showdown Extensions by specifying the "extensions" property when initializing your component:

handlebars
handlebars

(myExtensionList can be an array of strings or a space separated string)

Note that you'll have to register your extensions with Showdown first. For example, in an initializer:

javascript
// app/initializers/register-showdown-extensions.js
import showdown from "showdown";

export function initialize() {
  showdown.extension("myExtensionName", function () {
    return [
      {
        type: "html",
        regex: "
",
        replace: '
',
      },
    ];
  });
}

export default {
  name: "register-showdown-extensions",
  initialize,
};

3.x to 4.3 migration

  • Global showdown is no longer supported. Must be imported via import showdown from 'showdown'
  • Remove any use of FastBoot.require('require') with import showdown from 'showdown'

7.x to 8.x migration

  • Positional parameters are no longer supported. Use the @markdown argument to provide the markdown content to ``.

Dependencies

  • Showdown

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Issues· 8 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言