2014-09-26 22:30:54 +02:00
|
|
|
$(document).ready ->
|
|
|
|
# Setup the graphical editor for event's description
|
|
|
|
tinyMCE.init
|
|
|
|
schema: 'html5',
|
|
|
|
menubar: false,
|
|
|
|
language: 'fr_FR',
|
2015-12-26 23:32:04 +01:00
|
|
|
selector: 'textarea.description',
|
2014-09-26 22:30:54 +02:00
|
|
|
content_css: '<%= asset_path 'application.css' %>',
|
|
|
|
entity_encoding : 'raw',
|
|
|
|
add_unload_trigger: true,
|
|
|
|
browser_spellcheck: true,
|
|
|
|
toolbar: [
|
|
|
|
' bold italic strikethrough
|
|
|
|
| bullist numlist outdent indent
|
|
|
|
| alignleft aligncenter alignright alignjustify
|
|
|
|
| link image media insertdatetime charmap table
|
|
|
|
| undo redo
|
|
|
|
| searchreplace
|
|
|
|
| code visualblocks preview fullscreen'
|
|
|
|
],
|
|
|
|
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print,
|
|
|
|
preview, table, fullscreen, searchreplace, media, insertdatetime,
|
|
|
|
visualblocks, visualchars, wordcount, contextmenu, code'
|
|
|
|
|
|
|
|
$(document).on 'page:receive', ->
|
|
|
|
# Delete existing tinymce editors, very important in the turbolinks context!
|
|
|
|
tinymce.remove()
|