Changes to the tinymce editor
This commit is contained in:
parent
053a94198e
commit
3485a9b9c9
@ -1,8 +1,9 @@
|
|||||||
$(document).on 'turbolinks:load', ->
|
$(document).on 'turbolinks:load', ->
|
||||||
# Setup the graphical editor for event's description
|
# Setup the graphical editor for event's description
|
||||||
tinyMCE.init
|
tinyMCE.init
|
||||||
|
width: 'auto',
|
||||||
schema: 'html5',
|
schema: 'html5',
|
||||||
menubar: false,
|
branding: false,
|
||||||
language: 'fr_FR',
|
language: 'fr_FR',
|
||||||
selector: 'textarea.description',
|
selector: 'textarea.description',
|
||||||
content_css: '<%= asset_path 'application.css' %>',
|
content_css: '<%= asset_path 'application.css' %>',
|
||||||
@ -10,17 +11,21 @@ $(document).on 'turbolinks:load', ->
|
|||||||
add_unload_trigger: true,
|
add_unload_trigger: true,
|
||||||
browser_spellcheck: true,
|
browser_spellcheck: true,
|
||||||
toolbar: [
|
toolbar: [
|
||||||
' bold italic strikethrough
|
' cut copy paste
|
||||||
| bullist numlist outdent indent
|
|
||||||
| alignleft aligncenter alignright alignjustify
|
|
||||||
| link image media insertdatetime charmap table
|
|
||||||
| undo redo
|
| undo redo
|
||||||
| searchreplace
|
| 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,
|
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print,
|
||||||
preview, table, fullscreen, searchreplace, media, insertdatetime,
|
preview, table, fullscreen, searchreplace, media, insertdatetime,
|
||||||
visualblocks, visualchars, wordcount, contextmenu, code'
|
visualblocks, wordcount, contextmenu, code'
|
||||||
|
|
||||||
$(document).on 'turbolinks:before-cache', ->
|
$(document).on 'turbolinks:before-cache', ->
|
||||||
# Delete existing tinymce editors, very important in the turbolinks context!
|
# Delete existing tinymce editors, very important in the turbolinks context!
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -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);
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user