24 lines
1.0 KiB
JavaScript
24 lines
1.0 KiB
JavaScript
(function() {
|
|
$(document).on('turbolinks:load', function() {
|
|
return tinyMCE.init({
|
|
schema: 'html5',
|
|
height: '40em',
|
|
menubar: false,
|
|
branding: false,
|
|
language: 'fr_FR',
|
|
selector: 'input.description',
|
|
content_css: '/assets/application-3b96b828456bf029c46d8f6d17585e4ac5696f84bccd5b24a70a52205132b629.css',
|
|
entity_encoding: 'raw',
|
|
add_unload_trigger: true,
|
|
browser_spellcheck: true,
|
|
toolbar: [' cut copy paste | undo redo | searchreplace | link image media charmap table | code visualblocks preview fullscreen', ' removeformat | bold italic strikethrough | superscript subscript | bullist numlist | alignleft aligncenter alignright alignjustify alignnone | outdent indent'],
|
|
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print, preview, table, fullscreen, searchreplace, media, insertdatetime, visualblocks, wordcount, contextmenu, code'
|
|
});
|
|
});
|
|
|
|
$(document).on('turbolinks:before-cache', function() {
|
|
return tinymce.remove();
|
|
});
|
|
|
|
}).call(this);
|