agenda-libre-ruby/app/assets/javascripts/setup_tinymce.coffee.erb

31 lines
1.0 KiB
Plaintext
Raw Normal View History

$(document).on 'turbolinks:load', ->
# Setup the graphical editor for event's description
tinyMCE.init
2019-04-19 21:42:52 +02:00
width: '100%'
height: '40em'
menubar: false
branding: false
language: 'fr_FR'
selector: 'input.description'
content_css: '<%= asset_path 'application.css' %>'
entity_encoding: 'raw'
add_unload_trigger: true
browser_spellcheck: true
2019-04-19 21:42:52 +02:00
style_formats_autohide: true
toolbar: [
2017-05-06 16:11:24 +02:00
' cut copy paste
| undo redo
2017-05-06 16:11:24 +02:00
| link image media charmap table
2019-04-19 21:42:52 +02:00
| code visualblocks searchreplace',
' removeformat bold italic strikethrough superscript subscript
| bullist numlist outdent indent
| alignleft aligncenter alignright alignjustify alignnone'
]
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print,
preview, table, fullscreen, searchreplace, media, insertdatetime,
2017-05-06 16:11:24 +02:00
visualblocks, wordcount, contextmenu, code'
$(document).on 'turbolinks:before-cache', ->
# Delete existing tinymce editors, very important in the turbolinks context!
tinymce.remove()