From 86c2a611e55c9e35384febecf34964e214c0296e Mon Sep 17 00:00:00 2001
From: polo
Modification d'un article
"); - echo "\n"; - - echo($editeurHTML); // injection de template-editor.php -} + // remplacer un article par l'éditeur + if($_SESSION['admin'] == 1 && isset($_GET['action']) && $_GET['action'] == 'editor' && isset($_GET['article']) && $_GET['article'] == $j) + { + // on pourrait utiliser le timedate, ou encore le nom de l'article + echo("\nModifier l'article " . $j . "
"); + //echo("Modification d'un article
"); + echo "\n"; -// placer un article -else -{ - // c'était pas compliqué - echo($article . "\n"); + echo($editeurHTML); // injection de template-editor.php + } - // bouton - if($_SESSION['admin'] == 1) + // placer un article + else { - ?> - - + + diff --git a/view/template-ckeditor.php b/view/template-ckeditor.php index f95344a..12e1430 100644 --- a/view/template-ckeditor.php +++ b/view/template-ckeditor.php @@ -174,7 +174,7 @@ ob_start(); // obtenir la liste des plugins disponibles: //alert(ClassicEditor.builtinPlugins.map( plugin => plugin.pluginName )); - var initial = '= $initial ?>'; + var initial = '= $texte ?>'; editor.setData(initial); } ) .catch( error => { -- cgit v1.2.3