From 99b1c288125fc7aea42457c4a4bfdc129daecaba Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 12 Jan 2026 22:50:16 +0100 Subject: finitions --- public/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'public/index.php') diff --git a/public/index.php b/public/index.php index c81728a..7bbb545 100644 --- a/public/index.php +++ b/public/index.php @@ -1,4 +1,6 @@ = 200 && $httpCode < 300){ return $imageData; @@ -157,7 +159,7 @@ elseif(isset($_GET['action']) && in_array($_GET['action'], ['upload_image', 'upl die; } if(!is_uploaded_file($_FILES['file']['tmp_name'])) { - http_response_code(500); + http_response_code(400); echo json_encode(['message' => "Le fichier n'a pas été téléchargé correctement."]); die; } @@ -280,7 +282,7 @@ elseif(isset($_GET['action']) && $_GET['action'] == 'upload_file'){ tinymce.init({ selector: `#${article_id}`, - language: 'fr_FR', // télécharger des paquets de langue ici: https://www.tiny.cloud/get-tiny/language-packages/ + language: 'fr_FR', language_url: '../vendor/mklkj/tinymce-i18n/langs/fr_FR.js', // paquet mklkj/tinymce-i18n avec composer license_key: 'gpl', branding: false, @@ -310,7 +312,7 @@ elseif(isset($_GET['action']) && $_GET['action'] == 'upload_file'){ }); let skipPastePreProcess = false; editor.on('Paste', function (e){ // déclenchement AVANT PastePreProcess et quelque que soit le contenu collé - if (!e.clipboardData) { // e.clipboardData: DataTransfer + if(!e.clipboardData){ // e.clipboardData: DataTransfer return; } const items = e.clipboardData.items; // base64 -- cgit v1.2.3