Unable (or unclear how) to set showdown config
- Dominant language
- JavaScript
- Stars
- 19
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
[Per the docs for ember-cli-showdown](https://github.com/empress/ember-cli-showdown#global-showdown-options) 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](https://github.com/empress/field-guide/blob/37ba2c2e116f5a83be1fe1b564bfd7474646466f/addon/controllers/show.js).
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.
```js
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);
})
})
```
Contributor guide
Assessment
This issue has not been assessed yet.