empress / ember-cli-showdown

Ember component to render markdown into HTML.
https://empress.github.io/ember-cli-showdown/
MIT License
101 stars 35 forks source link

Ability to make component tag-less #72

Open sheriffderek opened 5 years ago

sheriffderek commented 5 years ago

Sometimes I have a situation like this - where my H1 might be coming from a different place / and then I can't style adjacent selectors because of the div.ember-view that changes the heirarchy.

<PageSection>
  {{#each model.blocks as |block|}}
    <article class='editorial'>
      <h1 class='name'>{{block.name}}</h1>

      {{markdown-to-html block.value}}
    </article>
  {{/each}}
</PageSection>
screen shot 2019-01-28 at 5 44 13 pm
.editorial
  h1
    strong-voice()
    + p
      margin-top: $pad
      border: 1px solid red
    + h2
      margin-top: $pad
      border: 3px solid red
  h2
    color: $highlight
    + p
      margin-top: $pad

(I can change how the CMS works to avoid this / but if there's a go-to way to extend or change that component - that would be cool. : )

yaxinr commented 5 years ago

{{markdown-to-html block.value tagName=''}}