app/assets/javascripts/thredded/components/post_form.es6 in thredded-0.9.3 vs app/assets/javascripts/thredded/components/post_form.es6 in thredded-0.9.4
- old
+ new
@@ -1,5 +1,7 @@
+//= require ./preview_area
+
(($) => {
const COMPONENT_SELECTOR = '[data-thredded-post-form]';
class ThreddedPostForm {
constructor() {
@@ -7,9 +9,12 @@
}
init($nodes) {
let $textarea = $nodes.find(this.textareaSelector);
this.autosize($textarea);
+ $nodes.each(function() {
+ new ThreddedPreviewArea($(this));
+ });
new ThreddedMentionAutocompletion($).init($nodes);
}
autosize($textarea) {
$textarea.autosize()