summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-03-21 00:47:16 +0100
committerpolo <ordipolo@gmx.fr>2025-03-21 00:47:16 +0100
commit141291c29306391f91e7ceee57ff4d6e9907ab1d (patch)
tree3896896e18f4c8d84c8108e1c80e3d8c7093e712 /src
parent51a5391c96043829f7bbccda1262a51a8b8f93d8 (diff)
downloadckeditor5-141291c29306391f91e7ceee57ff4d6e9907ab1d.zip
dossier publicHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/integration/ckeditor5/article_hors_editeur.css38
-rw-r--r--src/service/ckeditor5/CKEditor.php (renamed from src/integration/ckeditor5/CKEditor.php)16
-rw-r--r--src/service/ckeditor5/image_upload.php (renamed from src/integration/ckeditor5/image_upload.php)0
-rw-r--r--src/service/ckeditor5/view.php (renamed from src/integration/ckeditor5/view.php)0
4 files changed, 8 insertions, 46 deletions
diff --git a/src/integration/ckeditor5/article_hors_editeur.css b/src/integration/ckeditor5/article_hors_editeur.css
deleted file mode 100644
index 622b539..0000000
--- a/src/integration/ckeditor5/article_hors_editeur.css
+++ /dev/null
@@ -1,38 +0,0 @@
1article{width: 630px;}
2article:after{content: ""; display: block; clear: both;}
3
4img{vertical-align: bottom;}
5@media screen and (max-width: 1000px)
6{img{max-width: 900px;}}
7
8.text-tiny{font-size: x-small;}
9.text-small{font-size: small;}
10.text-big{font-size: large;}
11.text-huge{font-size: x-large;}
12
13blockquote{border-left: 5px #cccccc solid; margin: 14px 0px; padding: 2px 25px; font-style: italic;}
14
15.marker-yellow{background-color: #fdfd77;}
16.marker-green{background-color: #62f962;}
17.marker-pink{background-color: #fc7899;}
18.marker-blue{background-color: #72ccfd;}
19.pen-red{background-color: white; color: red;}
20.pen-green{background-color: white; color: green;}
21
22ul{padding-left: 10px;}
23.todo-list>li{list-style-type : none;}
24input[type=checkbox]{-webkit-appearance: none;-moz-appearance: none;-ms-appearance: none;
25height: 16px; width: 16px; border: 1px solid black; border-radius: 2px; position: relative; top: 5px; margin-right: 10px;}
26input[type="checkbox"]:checked{border: none; background: #26ab33;}
27
28.table>table{border-collapse: collapse;}
29.table td{border: 1px grey solid; padding: 7px; min-width: 30px;}
30td p{margin: 0px;}
31
32.image{margin: 0px; text-align: center; display: inline-block;}
33.image-style-side{float: right;}
34.image img{max-width: 630px;}
35.image-style-side img{max-width: 315px;}
36.image>figcaption{margin: 0px 10px; padding: 7px; text-align: center; font-size: small; background-color: #f7f7f7;}
37
38iframe{min-width: 400px; min-height: 300px; max-width: 1200px; max-height: 900px;}
diff --git a/src/integration/ckeditor5/CKEditor.php b/src/service/ckeditor5/CKEditor.php
index c53f236..3adf223 100644
--- a/src/integration/ckeditor5/CKEditor.php
+++ b/src/service/ckeditor5/CKEditor.php
@@ -5,8 +5,8 @@ declare(strict_types=1);
5 5
6class CKEditor 6class CKEditor
7{ 7{
8 public const string INTEGRATION_PATH = 'src/integration/ckeditor5/'; 8 public const string INTEGRATION_PATH = '../src/service/ckeditor5/';
9 public const string DATA_PATH = 'data/page'; 9 public const string DATA_PATH = '../data/page';
10 //public const string SERVER_PATH = '/'; 10 //public const string SERVER_PATH = '/';
11 private const string SERVER_PATH = '/ckeditor5/'; 11 private const string SERVER_PATH = '/ckeditor5/';
12 12
@@ -27,7 +27,7 @@ class CKEditor
27 public function __construct() 27 public function __construct()
28 { 28 {
29 $this->php_ini_max_size = $this->returnBytes(ini_get('upload_max_filesize')); // = 2M par défaut dans le php.ini 29 $this->php_ini_max_size = $this->returnBytes(ini_get('upload_max_filesize')); // = 2M par défaut dans le php.ini
30 $this->css_outside_editor_tag = '<link rel="stylesheet" href="' . self::INTEGRATION_PATH . 'article_hors_editeur.css" />'; 30 $this->css_outside_editor_tag = '<link rel="stylesheet" href="css/article_hors_editeur.css" />';
31 $this->server_root = $_SERVER['SERVER_NAME'] . self::SERVER_PATH; 31 $this->server_root = $_SERVER['SERVER_NAME'] . self::SERVER_PATH;
32 } 32 }
33 33
@@ -98,9 +98,9 @@ class CKEditor
98 public function openEditor(string $id = '', string $texte = ''): string 98 public function openEditor(string $id = '', string $texte = ''): string
99 { 99 {
100 // version "minifiée" 100 // version "minifiée"
101 $this->css_editor_tag = '<link rel="stylesheet" href="node_modules/ckeditor5/dist/browser/ckeditor5.css" />'; 101 $this->css_editor_tag = '<link rel="stylesheet" href="../node_modules/ckeditor5/dist/browser/ckeditor5.css" />';
102 // version normale aérée et commentée" 102 // version normale aérée et commentée"
103 $this->css_editor_tag = '<link rel="stylesheet" href="node_modules/ckeditor5/dist/ckeditor5.css" />'; 103 $this->css_editor_tag = '<link rel="stylesheet" href="../node_modules/ckeditor5/dist/ckeditor5.css" />';
104 104
105 require self::INTEGRATION_PATH . 'view.php'; // html + JS 105 require self::INTEGRATION_PATH . 'view.php'; // html + JS
106 return $editeurHTML; 106 return $editeurHTML;
@@ -127,7 +127,7 @@ class CKEditor
127 private function makeTranslationSymLink(): void 127 private function makeTranslationSymLink(): void
128 { 128 {
129 $target = '../translations'; 129 $target = '../translations';
130 $link = 'node_modules/ckeditor5/dist/browser/translations'; 130 $link = '../node_modules/ckeditor5/dist/browser/translations';
131 131
132 if(!file_exists($link)) 132 if(!file_exists($link))
133 { 133 {
@@ -138,7 +138,7 @@ class CKEditor
138 elseif(PHP_OS_FAMILY === 'Windows') // note: PHP_OS = WINNT 138 elseif(PHP_OS_FAMILY === 'Windows') // note: PHP_OS = WINNT
139 { 139 {
140 // on peut créer une jointure sans droit d'admin 140 // on peut créer une jointure sans droit d'admin
141 $target = 'node_modules\ckeditor5\dist\translations'; 141 $target = '..\node_modules\ckeditor5\dist\translations';
142 exec('mklink /J ' . str_replace('/', '\\', $link) . ' ' . $target); 142 exec('mklink /J ' . str_replace('/', '\\', $link) . ' ' . $target);
143 } 143 }
144 else 144 else
@@ -173,7 +173,7 @@ class CKEditor
173 //$this->checkContentInFile($html, 'avant'); 173 //$this->checkContentInFile($html, 'avant');
174 174
175 // sécurisation du HTML (faille XSS) 175 // sécurisation du HTML (faille XSS)
176 require 'vendor/htmlawed/htmlawed/htmLawed.php'; 176 require '../vendor/htmlawed/htmlawed/htmLawed.php';
177 $configHtmLawed = array( 177 $configHtmLawed = array(
178 'safe'=>1, // protection contre les élements et attributs dangereux 178 'safe'=>1, // protection contre les élements et attributs dangereux
179 179
diff --git a/src/integration/ckeditor5/image_upload.php b/src/service/ckeditor5/image_upload.php
index 5cef369..5cef369 100644
--- a/src/integration/ckeditor5/image_upload.php
+++ b/src/service/ckeditor5/image_upload.php
diff --git a/src/integration/ckeditor5/view.php b/src/service/ckeditor5/view.php
index 57115d1..57115d1 100644
--- a/src/integration/ckeditor5/view.php
+++ b/src/service/ckeditor5/view.php