MCPcopy Create free account
hub / github.com/codecombat/codecombat / togglePreview

Method togglePreview

app/core/treema-ext.js:159–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

hideMethod · 0.45

Tested by

no test coverage detected