[10.0.142] Tinymce insertion de code + coloration

This commit is contained in:
fredtempez 2020-03-11 19:00:13 +01:00
parent a15f1ce1c8
commit 2229a11db7
5 changed files with 64 additions and 51 deletions

View File

@ -33,7 +33,7 @@ class common {
const TEMP_DIR = 'site/tmp/';
// Numéro de version
const ZWII_VERSION = '10.0.041.rc';
const ZWII_VERSION = '10.0.042';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];

View File

@ -2,5 +2,7 @@
"tinymce.min.js",
"jquery.tinymce.min.js",
"init.js",
"init.css"
"init.css",
"plugins/codesample/js/prism.fr",
"plugins/codesample/css/prism.css"
]

View File

@ -18,9 +18,9 @@ tinymce.init({
// Langue
language: "fr_FR",
// Plugins
plugins: "advlist anchor autolink autoresize autosave codemirror colorpicker contextmenu fullscreen hr image imagetools link lists media paste searchreplace stickytoolbar tabfocus table template textcolor visualblocks",
plugins: "advlist anchor autolink autoresize autosave codemirror colorpicker contextmenu fullscreen hr image imagetools link lists media paste searchreplace stickytoolbar tabfocus table template textcolor codesample",
// Contenu de la barre d'outils
toolbar: "restoredraft | undo redo | styleselect | bold italic underline strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | image media link anchor inserttable hr template code visualblocks fullscreen",
toolbar: "restoredraft | undo redo | styleselect | bold italic underline strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | image media link anchor inserttable hr template code codesample fullscreen",
// CodeMirror
codemirror: {
indentOnInit: true, // Whether or not to indent code on init.

View File

@ -1,4 +1,5 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
/* PrismJS 1.19.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
@ -8,9 +9,10 @@
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
direction: ltr;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
@ -63,6 +65,7 @@ pre[class*="language-"] {
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
@ -76,7 +79,7 @@ pre[class*="language-"] {
color: #999;
}
.namespace {
.token.namespace {
opacity: .7;
}
@ -104,7 +107,7 @@ pre[class*="language-"] {
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
@ -114,7 +117,8 @@ pre[class*="language-"] {
color: #07a;
}
.token.function {
.token.function,
.token.class-name {
color: #DD4A68;
}

File diff suppressed because one or more lines are too long