()
| 157 | } |
| 158 | |
| 159 | togglePreview () { |
| 160 | const valEl = this.getValEl() |
| 161 | if (this.showingPreview) { |
| 162 | valEl.find('.preview').hide() |
| 163 | valEl.find('.pick-image-button').show() |
| 164 | valEl.find('.ace_editor').show() |
| 165 | } else { |
| 166 | valEl.find('.preview').html(marked(this.data)).show() |
| 167 | valEl.find('.pick-image-button').hide() |
| 168 | valEl.find('.ace_editor').hide() |
| 169 | } |
| 170 | return this.showingPreview = !this.showingPreview |
| 171 | } |
| 172 | } |
| 173 | LiveEditingMarkup.initClass() |
| 174 | return LiveEditingMarkup |