Html Module can now be editing, saved, and re-opened
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
class @HTML
|
||||
constructor: (@id) ->
|
||||
id = @id
|
||||
$("##{id} .edit-box").on('input', ->
|
||||
$("##{id} .preview").empty().append($(this).val())
|
||||
@edit_box = $("##{@id} .edit-box")
|
||||
@preview = $("##{@id} .preview")
|
||||
@edit_box.on('input', =>
|
||||
@preview.empty().append(@edit_box.val())
|
||||
)
|
||||
|
||||
save: -> $("##{@id} .edit-box").val()
|
||||
save: -> {text: @edit_box.val()}
|
||||
|
||||
Reference in New Issue
Block a user