demarches-normaliennes/app/assets/javascripts/old_design/bootstrap_wysihtml5.js

40 lines
696 B
JavaScript
Raw Normal View History

2018-10-02 16:59:30 +02:00
/* globals $ */
2017-03-30 17:00:35 +02:00
$(document).on('turbolinks:load', wysihtml5_active);
2018-10-02 16:59:30 +02:00
function wysihtml5_active() {
2017-04-04 16:15:33 +02:00
$('.wysihtml5').each(function(i, elem) {
$(elem).wysihtml5({
toolbar: {
2018-10-02 16:59:30 +02:00
fa: true,
link: false,
color: false
},
parserRules: {
tags: {
p: {},
h1: {},
h2: {},
h3: {},
h4: {},
h5: {},
h6: {},
b: {},
i: {},
u: {},
small: {},
blockquote: {},
ul: {},
ol: {},
li: {},
img: {},
code: {
unwrap: 1
}
}
},
2018-10-02 16:59:30 +02:00
locale: 'fr-FR'
});
2017-04-04 16:15:33 +02:00
});
}