Changes to the tinymce editor

rails5
echarp 6 years ago
parent 053a94198e
commit 3485a9b9c9
  1. 19
      app/assets/javascripts/tinymce.coffee.erb
  2. 2
      public/assets/.sprockets-manifest-15ceda6913c644f60925b0cd3079d44e.json
  3. 90089
      public/assets/application-7dd33439b49eb6699fe510cd80aae7e34c85d886068af3f4de7a091bab6c6f8c.js
  4. BIN
      public/assets/application-7dd33439b49eb6699fe510cd80aae7e34c85d886068af3f4de7a091bab6c6f8c.js.gz
  5. 22
      public/assets/tinymce-cdd545adafb8e6562eecd22960f1d9724dec82226ec1fb55c01c88c2d1270b79.js
  6. BIN
      public/assets/tinymce-cdd545adafb8e6562eecd22960f1d9724dec82226ec1fb55c01c88c2d1270b79.js.gz

@ -1,8 +1,9 @@
$(document).on 'turbolinks:load', ->
# Setup the graphical editor for event's description
tinyMCE.init
width: 'auto',
schema: 'html5',
menubar: false,
branding: false,
language: 'fr_FR',
selector: 'textarea.description',
content_css: '<%= asset_path 'application.css' %>',
@ -10,17 +11,21 @@ $(document).on 'turbolinks:load', ->
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
' cut copy paste
| undo redo
| searchreplace
| code visualblocks preview fullscreen'
| 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, visualchars, wordcount, contextmenu, code'
visualblocks, wordcount, contextmenu, code'
$(document).on 'turbolinks:before-cache', ->
# Delete existing tinymce editors, very important in the turbolinks context!

File diff suppressed because one or more lines are too long

@ -0,0 +1,22 @@
(function() {
$(document).on('turbolinks:load', function() {
return tinyMCE.init({
width: 'auto',
schema: 'html5',
branding: false,
language: 'fr_FR',
selector: 'textarea.description',
content_css: '/assets/application-74c16b3b8c70a0ee2d3bc48bb2acbb9925fc52b1cd41171d7cb5063cd119ba3a.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);
Loading…
Cancel
Save