Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -# WYSIWYG Editor JavaScripts
- - if current_user.wysiwyg_editor
- = javascript_include_tag 'elrte.full'
- :coffeescript
- $ ->
- defaultHeight = 280
- defaultToolbar = 'normal'
- defaultWidth = null
- elRTE.prototype.options.panels.photoEmbedPanel = [
- 'bold'
- 'italic'
- 'justifyleft'
- 'justifycenter'
- 'justifyright'
- 'insertunorderedlist'
- 'link'
- ]
- elRTE.prototype.options.toolbars.photoEmbedToolbar = ['photoEmbedPanel']
- elRTE.prototype.options.panels.simplePanel = [
- 'bold', 'italic', 'underline', 'forecolor', 'justifyleft', 'justifyright',
- 'justifycenter', 'justifyfull', 'insertorderedlist', 'insertunorderedlist',
- 'link', 'image', 'redo','undo','formatblock']
- elRTE.prototype.options.toolbars.simpleToolBar = ['simplePanel']
- $('textarea:not(.no-wysiwyg)').each ->
- $area = $(this)
- height = if $area.data('wysiwygHeight') then parseInt($area.data('wysiwygHeight'), 10) else defaultHeight
- width = if $area.data('wysiwygWidth') then parseInt($area.data('wysiwygWidth'), 10) else defaultWidth
- toolbar = if $area.data('wysiwygToolbar') then $area.data('wysiwygToolbar') else defaultToolbar
- $area.elrte
- cssClass: 'el-rte'
- height: height
- width: width
- toolbar: 'simpleToolBar'
- cssfiles: [ '/stylesheets/elrte-inner.css' ]
- - else
- -# TODO: Add JS includes for MarkItUp!
- = javascript_include_tag 'markitup/jquery.markitup.js', 'markitup/sets/default/set.js'
- :coffeescript
- $ ->
- $('textarea').markItUp mySettings
Add Comment
Please, Sign In to add comment