How to use ember-cli-showdown - 1 common examples

To help you get started, we’ve selected a few ember-cli-showdown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github willviles / ember-scrollmagic / tests / dummy / app / components / markdown-content.js View on Github external
import { computed, get } from '@ember/object';
import { scheduleOnce } from '@ember/runloop';
import { inject } from '@ember/service';

import ShowdownComponent from 'ember-cli-showdown/components/markdown-to-html';

export default ShowdownComponent.extend({
  codePrettify: inject(),

  classNames: ['markdown-content'],

  html: computed('markdown', 'converter', function() {
    scheduleOnce('afterRender', this, function() {
      get(this, 'codePrettify').prettify();
    });

    return this._super(...arguments);
  }).readOnly()

});

ember-cli-showdown

Ember component to render markdown into HTML.

MIT
Latest version published 9 months ago

Package Health Score

64 / 100
Full package analysis

Popular ember-cli-showdown functions