1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
function TinyMCEStart(elem, mode){
var plugins = [];
if (mode == 'extreme'){
plugins = [ "advlist anchor autolink autoresize charmap code contextmenu directionality ",
"emoticons fullpage fullscreen hr image insertdatetime layer legacyoutput",
"link lists media nonbreaking noneditable pagebreak paste preview print searchreplace",
"tabfocus table template textcolor visualblocks visualchars wordcount"]
}
tinymce.init({selector: elem,
theme: "modern",
plugins: plugins,
//content_css: "css/style.css",
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | fontselect fontsizeselect",
style_formats: [
{title: 'Texte niveau 2', block: 'h2', classes: 'page-header'},
{title: 'Texte niveau 3', block: 'h3', classes: 'page-header'},
{title: 'Texte niveau 4', block: 'h4', classes: 'page-header'},
{title: 'Texte niveau 5', block: 'h5', classes: 'page-header'},
{title: 'Texte niveau 6', block: 'h6', classes: 'page-header'},
{title: 'Texte gras', inline: 'b'},
{title: 'Texte rouge', inline: 'span', styles: {color: '#ff0000'}},
{title: 'Texte niveau 1 rouge', block: 'h1', styles: {color: '#ff0000'}},
{title: 'Example 1', inline: 'span', classes: 'example1'},
{title: 'Example 2', inline: 'span', classes: 'example2'},
{title: 'Table styles'},
{title: 'Table row 1', selector: 'tr', classes: 'tablerow1'},
],
font_formats: 'ArciForm=ArciForm;Arial Black=arial black,avant garde;Indie Flower=indie flower, cursive;Times New Roman=times new roman,times;Helvetica=Helvetica'
});
}
$(document).ready(function(){
TinyMCEStart('#descr', 'extreme');
}); |
Partager