FIX: Add .cooked class to composer preview

This should make any custom styling apply to both the rendered posts and
the composer equally, as long as a .topic-body parent or a #wmd-preview
parent is not specified.
This commit is contained in:
riking 2014-09-03 13:15:11 -07:00
parent dac4ed5a1e
commit 824dadbc1b
2 changed files with 4 additions and 2 deletions

View file

@ -62,8 +62,9 @@
{{composer-text-area tabindex="3" value=model.reply}} {{composer-text-area tabindex="3" value=model.reply}}
{{popupInputTip validation=view.replyValidation shownAt=view.showReplyTip}} {{popupInputTip validation=view.replyValidation shownAt=view.showReplyTip}}
</div> </div>
<div class='preview-wrapper'> <!-- keep the classes here in sync with post.js.handlebars -->
<div id='wmd-preview' {{bind-attr class="hidePreview:hidden"}}></div> <div class='preview-wrapper contents regular'>
<div id='wmd-preview' {{bind-attr class="hidePreview:hidden :cooked"}}></div>
</div> </div>
<div class="composer-bottom-right"> <div class="composer-bottom-right">
<a href="#" {{action togglePreview}} class='toggle-preview'>{{{model.toggleText}}}</a> <a href="#" {{action togglePreview}} class='toggle-preview'>{{{model.toggleText}}}</a>

View file

@ -61,6 +61,7 @@
<button {{action toggledSelectedPost this}} class="select-post">{{view.selectPostText}}</button> <button {{action toggledSelectedPost this}} class="select-post">{{view.selectPostText}}</button>
</div> </div>
<!-- keep the classes here in sync with composer.js.handlebars -->
<div {{bind-attr class="showUserReplyTab:avoid-tab view.repliesShown::bottom-round :contents :regular view.extraClass"}}> <div {{bind-attr class="showUserReplyTab:avoid-tab view.repliesShown::bottom-round :contents :regular view.extraClass"}}>
<div class='cooked'> <div class='cooked'>
{{{cooked}}} {{{cooked}}}