diff options
| author | git-pc-greta <ordipolo@gmx.fr> | 2025-01-18 00:47:30 +0100 |
|---|---|---|
| committer | git-pc-greta <ordipolo@gmx.fr> | 2025-01-18 00:47:30 +0100 |
| commit | 718107e8efbcb42d6b263999a3d9f6c4f02f26e5 (patch) | |
| tree | 138fcfc1e9d60f13cdd81de6af080230722a36b0 /src | |
| parent | bbf50ae1ffa5b1b3b71f0e57d658d9beaaa50de0 (diff) | |
| download | ckeditor5-718107e8efbcb42d6b263999a3d9f6c4f02f26e5.tar.gz ckeditor5-718107e8efbcb42d6b263999a3d9f6c4f02f26e5.tar.bz2 ckeditor5-718107e8efbcb42d6b263999a3d9f6c4f02f26e5.zip | |
jointure (sorte de symlink) sur windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/integration/ckeditor5/config.php | 4 | ||||
| -rw-r--r-- | src/integration/ckeditor5/create.php | 2 | ||||
| -rw-r--r-- | src/integration/ckeditor5/init.php | 14 |
3 files changed, 15 insertions, 5 deletions
diff --git a/src/integration/ckeditor5/config.php b/src/integration/ckeditor5/config.php index 822884f..e185e8e 100644 --- a/src/integration/ckeditor5/config.php +++ b/src/integration/ckeditor5/config.php | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | <?php | 1 | <?php |
| 2 | // src/integration/ckeditor5/config.php | 2 | // src/integration/ckeditor5/config.php |
| 3 | 3 | ||
| 4 | $ckeditor_integration_path = 'src/integration/ckeditor5/'; | 4 | $ckeditor_integration = 'src/integration/ckeditor5/'; |
| 5 | $css_hors_editeur = '<link rel="stylesheet" href="' . $ckeditor_integration_path . 'article_hors_editeur.css" />'; | 5 | $css_hors_editeur = '<link rel="stylesheet" href="' . $ckeditor_integration . 'article_hors_editeur.css" />'; |
| 6 | 6 | ||
| 7 | $server_root = $_SERVER['SERVER_NAME'] . '/ckeditor5/'; | 7 | $server_root = $_SERVER['SERVER_NAME'] . '/ckeditor5/'; |
| 8 | // pour l'importmap: j'ai modifié la version "installation avec CDN de la doc pour utiliser les fichiers locaux | 8 | // pour l'importmap: j'ai modifié la version "installation avec CDN de la doc pour utiliser les fichiers locaux |
diff --git a/src/integration/ckeditor5/create.php b/src/integration/ckeditor5/create.php index 863c420..cf7242c 100644 --- a/src/integration/ckeditor5/create.php +++ b/src/integration/ckeditor5/create.php | |||
| @@ -14,5 +14,5 @@ elseif($storage === 'files') | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | // vue | 16 | // vue |
| 17 | require $ckeditor_integration_path . 'view.php'; // html + JS | 17 | require $ckeditor_integration . 'view.php'; // html + JS |
| 18 | $contenu = $editeurHTML; | 18 | $contenu = $editeurHTML; |
diff --git a/src/integration/ckeditor5/init.php b/src/integration/ckeditor5/init.php index 4d77cba..30e5fb9 100644 --- a/src/integration/ckeditor5/init.php +++ b/src/integration/ckeditor5/init.php | |||
| @@ -6,8 +6,18 @@ function makeTranslationSymLink(): void | |||
| 6 | { | 6 | { |
| 7 | $target = '../translations'; | 7 | $target = '../translations'; |
| 8 | $link = 'node_modules/ckeditor5/dist/browser/translations'; | 8 | $link = 'node_modules/ckeditor5/dist/browser/translations'; |
| 9 | if (!file_exists($link)) | 9 | |
| 10 | if(!file_exists($link)) | ||
| 10 | { | 11 | { |
| 11 | symlink($target, $link); | 12 | if(PHP_OS === 'Linux') |
| 13 | { | ||
| 14 | symlink($target, $link); | ||
| 15 | } | ||
| 16 | elseif(PHP_OS === 'WINNT') | ||
| 17 | { | ||
| 18 | // on peut créer une jointure sans droit d'admin | ||
| 19 | $target = 'node_modules\ckeditor5\dist\translations'; | ||
| 20 | exec('mklink /J ' . str_replace('/', '\\', $link) . ' ' . $target); | ||
| 21 | } | ||
| 12 | } | 22 | } |
| 13 | } | 23 | } |
