Skip to content

Unable (or unclear how) to set showdown config #73

@Dhaulagiri

Description

@Dhaulagiri

Per the docs for ember-cli-showdown it should be possible to set global showdown config via an app's environment.js. However, these options don't appear to be passed along to showdown as part of the way showdown is invoked in field-guide.

I was able to make this work by doing something like this, but it's unclear if this is the best solution of if there is something else I'm missing here.

export default Controller.extend({
  fieldGuideConfig: config['field-guide'],
  showdownConfig: config['showdown'],
  renderedContent: computed('model.content', function() {
    const converter = new showdown.Converter(this.showdownConfig);
    return converter.makeHtml(this.model.content);
  })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions