Fullscreen toggle for the markdown editor
This commit is contained in:
@@ -12,9 +12,18 @@ App.MarkdownEditor =
|
||||
breaks: true,
|
||||
typographer: true,
|
||||
})
|
||||
|
||||
App.MarkdownEditor.refresh_preview($(this), md)
|
||||
|
||||
$(this).on 'change input paste keyup', ->
|
||||
App.MarkdownEditor.refresh_preview($(this), md)
|
||||
return
|
||||
|
||||
$(this).find('.fullscreen-toggle').on 'click', ->
|
||||
$('.markdown-editor').toggleClass('fullscreen')
|
||||
|
||||
if $('.markdown-editor').hasClass('fullscreen')
|
||||
$('.markdown-editor textarea').height($(window).height() - 100)
|
||||
else
|
||||
$('.markdown-editor textarea').height("10em")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user