Quick quick correction, it seems a textarea containing html code that includes style elements is displayed as an empty textarea!
Replaced with a classic text input, tinymce picks it up correctly...
This commit is contained in:
parent
5ac25462bd
commit
bc5267c4dc
@ -2,9 +2,10 @@ $(document).on 'turbolinks:load', ->
|
|||||||
# Setup the graphical editor for event's description
|
# Setup the graphical editor for event's description
|
||||||
tinyMCE.init
|
tinyMCE.init
|
||||||
schema: 'html5',
|
schema: 'html5',
|
||||||
|
height: '40em',
|
||||||
branding: false,
|
branding: false,
|
||||||
language: 'fr_FR',
|
language: 'fr_FR',
|
||||||
selector: 'textarea.description',
|
selector: 'input.description',
|
||||||
content_css: '<%= asset_path 'application.css' %>',
|
content_css: '<%= asset_path 'application.css' %>',
|
||||||
entity_encoding : 'raw',
|
entity_encoding : 'raw',
|
||||||
add_unload_trigger: true,
|
add_unload_trigger: true,
|
||||||
|
@ -41,7 +41,8 @@
|
|||||||
:markdown
|
:markdown
|
||||||
#{t '.description_helper'}
|
#{t '.description_helper'}
|
||||||
= f.label :description
|
= f.label :description
|
||||||
= f.text_area :description, rows: 25, class: :description
|
/= f.text_area :description, rows: 25, class: :description
|
||||||
|
= f.text_field :description, class: :description
|
||||||
|
|
||||||
.field.place_name
|
.field.place_name
|
||||||
= f.label :place_name
|
= f.label :place_name
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
= f.text_field :name, required: true
|
= f.text_field :name, required: true
|
||||||
.field.description
|
.field.description
|
||||||
= f.label :description
|
= f.label :description
|
||||||
= f.text_area :description, rows: 25, class: :description
|
/= f.text_area :description, rows: 25, class: :description
|
||||||
|
= f.text_field :description, class: :description
|
||||||
.field.place_name
|
.field.place_name
|
||||||
= f.label :place_name
|
= f.label :place_name
|
||||||
= f.text_field :place_name
|
= f.text_field :place_name
|
||||||
|
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({
|
||||||
|
schema: 'html5',
|
||||||
|
height: '40em',
|
||||||
|
branding: false,
|
||||||
|
language: 'fr_FR',
|
||||||
|
selector: 'input.description',
|
||||||
|
content_css: '/assets/application-31446b61376e114e9c8dd48e3beb3218fd819e0de7fb8bb309580ce7e688bb5d.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