diff options
author | polo <ordipolo@gmx.fr> | 2025-01-14 23:53:17 +0100 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-01-14 23:53:17 +0100 |
commit | bbf50ae1ffa5b1b3b71f0e57d658d9beaaa50de0 (patch) | |
tree | bb4f695368c2895e58ee710582b6ff4a09653474 /index.php | |
parent | e9a5da044f63851aa37d401ef37c8102b08ae274 (diff) | |
download | ckeditor5-bbf50ae1ffa5b1b3b71f0e57d658d9beaaa50de0.zip |
meilleur filtrage upload AJAX
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -2,20 +2,17 @@ | |||
2 | // index.php | 2 | // index.php |
3 | 3 | ||
4 | require 'src/integration/ckeditor5/config.php'; | 4 | require 'src/integration/ckeditor5/config.php'; |
5 | require 'src/integration/ckeditor5/init.php'; | 5 | require $ckeditor_integration_path . 'init.php'; |
6 | makeTranslationSymLink(); | 6 | makeTranslationSymLink(); |
7 | 7 | ||
8 | 8 | ||
9 | // routage | 9 | // routage |
10 | 10 | ||
11 | // upload images AJAX | 11 | // upload images AJAX |
12 | if(isset($_GET['action']) && $_GET['action'] === 'upload_image') // image insérée dans l'éditeur => requête AJAX | 12 | require $ckeditor_integration_path . 'image_upload.php'; |
13 | { | ||
14 | require $ckeditor_integration_path . 'image_upload.php'; | ||
15 | } | ||
16 | 13 | ||
17 | // submit normal | 14 | // submit normal |
18 | elseif(isset($_GET['action']) && $_GET['action'] === 'submit') // HTML envoyé par l'éditeur | 15 | if(isset($_GET['action']) && $_GET['action'] === 'submit') // HTML envoyé par l'éditeur |
19 | { | 16 | { |
20 | require $ckeditor_integration_path . 'clean_html.php'; | 17 | require $ckeditor_integration_path . 'clean_html.php'; |
21 | $html_from_editor = getAndCleanEditorOutput(); // manipule $_POST['contenu']; | 18 | $html_from_editor = getAndCleanEditorOutput(); // manipule $_POST['contenu']; |