alpha_full/admin/contenu/contenu.summerNote.php
2026-04-06 22:58:51 +02:00

63 lines
6.9 KiB
PHP
Executable File

<script type="text/javascript">
function affSummNot(id, num) {
// -----------------------------------------------------
// Barre summerNote avec id variable en php
// -----------------------------------------------------
$('#'+id).summernote(
{
// -----------------------------------------------------
// Toolbar
// -----------------------------------------------------
lang: 'fr-FR',
dialogsInBody: false,
dialogsFade: true,
spellCheck: true,
border:0,
height: 100, // set editor height
minHeight: 50, // set minimum height of editor
maxHeight: 100, // set maximum height of editor
focus: true, // set focus to editable area after initializing summernote
fontNames: ['Roboto Light', 'Roboto Regular', 'Roboto Bold', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Merriweather', 'Helvetica, sans-serif', 'Arial, sans-serif', 'Verdana, sans-serif', 'Trebuchet MS, sans-serif', 'Gill Sans, sans-serif', 'Gill Sans Extrabold, sans-serif', 'Noto Sans, sans-serif', 'Avantgarde, sans-serif', 'TeX Gyre Adventor, sans-serif', 'URW Gothic L, sans-serif', 'Optima, sans-serif', 'Liberation Sans, sans-serif', 'Tahoma, sans-serif', 'Geneva, sans-serif', 'Kalimati, sans-serif', 'Impact, sans-serif', 'Charcoal, sans-serif', 'Goudy Bookletter 1911, sans-serif', 'Smooch Sans, sans-serif;', 'Roboto, sans-serif', 'Cairo, sans-serif', 'Assistant, sans-serif', 'Philosopher, sans-serif', 'Aclonica, sans-serif', 'Times New Roman, Times, serif', 'Didot, serif', 'Georgia, serif', 'Palatino, URW Palladio L, serif', 'Bookman, URW Bookman L, serif', 'New Century Schoolbook, serif', 'American Typewriter, serif', 'Playfair Display, serif', 'Noto Serif Display, serif', 'Cormorant Garamond, serif', 'Markazi Text, serif', 'Lucida Console, Courier, monospace', 'OCR A Std, monospace', 'Monaco, DejaVu Sans Mono', 'Andale Mono, monospace', 'Courier New, monospace', 'Courier, monospace', 'FreeMono, monospace', 'OCR A Std, monospace', 'DejaVu Sans Mono, monospace', 'Comic Sans MS, Comic Sans, cursive', 'Apple Chancery, cursive', 'Bradley Hand, cursive', 'Brush Script MT, cursive', 'Snell Roundhand, cursive', 'URW Chancery L, cursive', 'BhuTuka Expanded One, cursive;', 'Hubballi, cursive;', 'Pacifico, cursive;', 'Dancing Script, cursive;', 'Permanent Marker, cursive;', 'Righteous, cursive;', 'Kalam, cursive;', 'Monoton, cursive;', 'Nothing You Could Do, cursive;', 'Sansita Swashed, cursive;', 'Shadows Into Light, cursive;', 'Indie Flower, cursive;', 'Caveat, cursive;', 'Patrick Hand, cursive;', 'Satisfy, cursive;', 'Amatic SC, cursive;', 'Handlee, cursive;', 'Playball, cursive;', 'Merienda, cursive;', 'Tangerine, cursive;', 'Mali, cursive;', 'Audiowide, cursive;', 'Itim, cursive;', 'Coda, cursive;', 'Italianno, cursive;', 'Cabin Sketch, cursive;', 'Rye, cursive;', 'Henny Penny, cursive;', 'Petit Formal Script, cursive;', 'Bungee Inline, cursive;', 'Grand Hotel, cursive;', 'Lemon, cursive;', 'Copperplate, fantasy', 'Gothic Light, fantasy', 'Impact, fantasy', 'Luminari, fantasy', 'Chalkduster, fantasy', 'Jazz LET, fantasy', 'Blippo, fantasy', 'Stencil Std, fantasy', 'Marker Felt, fantasy', 'Trattatello, fantasy'],
fontNamesIgnoreCheck: ['Roboto Light', 'Roboto Regular', 'Roboto Bold', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Merriweather', 'Helvetica, sans-serif', 'Arial, sans-serif', 'Verdana, sans-serif', 'Trebuchet MS, sans-serif', 'Gill Sans, sans-serif', 'Gill Sans Extrabold, sans-serif', 'Noto Sans, sans-serif', 'Avantgarde, sans-serif', 'TeX Gyre Adventor, sans-serif', 'URW Gothic L, sans-serif', 'Optima, sans-serif', 'Liberation Sans, sans-serif', 'Tahoma, sans-serif', 'Geneva, sans-serif', 'Kalimati, sans-serif', 'Impact, sans-serif', 'Charcoal, sans-serif', 'Goudy Bookletter 1911, sans-serif', 'Smooch Sans, sans-serif;', 'Roboto, sans-serif', 'Cairo, sans-serif', 'Assistant, sans-serif', 'Philosopher, sans-serif', 'Aclonica, sans-serif', 'Times New Roman, Times, serif', 'Didot, serif', 'Georgia, serif', 'Palatino, URW Palladio L, serif', 'Bookman, URW Bookman L, serif', 'New Century Schoolbook, serif', 'American Typewriter, serif', 'Playfair Display, serif', 'Noto Serif Display, serif', 'Cormorant Garamond, serif', 'Markazi Text, serif', 'Lucida Console, Courier, monospace', 'OCR A Std, monospace', 'Monaco, DejaVu Sans Mono', 'Andale Mono, monospace', 'Courier New, monospace', 'Courier, monospace', 'FreeMono, monospace', 'OCR A Std, monospace', 'DejaVu Sans Mono, monospace', 'Comic Sans MS, Comic Sans, cursive', 'Apple Chancery, cursive', 'Bradley Hand, cursive', 'Brush Script MT, cursive', 'Snell Roundhand, cursive', 'URW Chancery L, cursive', 'BhuTuka Expanded One, cursive;', 'Hubballi, cursive;', 'Pacifico, cursive;', 'Dancing Script, cursive;', 'Permanent Marker, cursive;', 'Righteous, cursive;', 'Kalam, cursive;', 'Monoton, cursive;', 'Nothing You Could Do, cursive;', 'Sansita Swashed, cursive;', 'Shadows Into Light, cursive;', 'Indie Flower, cursive;', 'Caveat, cursive;', 'Patrick Hand, cursive;', 'Satisfy, cursive;', 'Amatic SC, cursive;', 'Handlee, cursive;', 'Playball, cursive;', 'Merienda, cursive;', 'Tangerine, cursive;', 'Mali, cursive;', 'Audiowide, cursive;', 'Itim, cursive;', 'Coda, cursive;', 'Italianno, cursive;', 'Cabin Sketch, cursive;', 'Rye, cursive;', 'Henny Penny, cursive;', 'Petit Formal Script, cursive;', 'Bungee Inline, cursive;', 'Grand Hotel, cursive;', 'Lemon, cursive;', 'Copperplate, fantasy', 'Gothic Light, fantasy', 'Impact, fantasy', 'Luminari, fantasy', 'Chalkduster, fantasy', 'Jazz LET, fantasy', 'Blippo, fantasy', 'Stencil Std, fantasy', 'Marker Felt, fantasy', 'Trattatello, fantasy'],
blockquoteBreakingLevel: 0, //tout devrait etre dans le meme block
fontSizes: ['8', '9', '10', '11', '12', '13', '14', '15', '16' ,'17','18', '24', '36', '48' , '64', '82', '150'],
// styleTags: [
// 'p',
// {title: 'client', tag: 'blockquote', className: 'clients', value: 'blockquote' },
// 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
// ],
image: [
['image', ['resizeFull', 'resizeHalf', 'resizeQuarter', 'resizeNone']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
],
link: [
['link', ['linkDialogShow', 'unlink'] ]
],
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'strikethrough']],
['fontname', ['fontname', 'fontsize', 'fontsizeunit', 'superscript', 'subscript']],
['color', ['color', 'backcolor', 'forecolor']],
['para', ['ul', 'ol', 'paragraph','height']],
['table', ['table']],
['insert', ['link', 'picture']],
['view',['codeview', 'clear', 'undo', 'redo' ]]
]
}
);
var item ="save"+num;
if (document.getElementById(item)) {
// alert ('get');
document.getElementById(item).style.display='inline-block';
document.getElementById(item).style.width='200px';
}
else alert ('get pas'+num);
}
</script>