File: 0001-Use-ckeditor4.patch

package info (click to toggle)
php-horde-editor 2.0.5%2Bdebian0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 204 kB
  • sloc: xml: 1,071; php: 86; makefile: 18
file content (42 lines) | stat: -rw-r--r-- 2,086 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Forwarded: not-needed
Reviewed-by: Bastien Roucariès <rouca@debian.org>
Reviewed-by: Sylvain Beucler <beuc@debian.org>
Last-Update: 2025-03-21

ckeditor3 is EOL and horde-specific in Debian, drop the dependency.

Index: php-horde-editor-2.0.5+debian0/Horde_Editor-2.0.5/lib/Horde/Editor/Ckeditor.php
===================================================================
--- php-horde-editor-2.0.5+debian0.orig/Horde_Editor-2.0.5/lib/Horde/Editor/Ckeditor.php
+++ php-horde-editor-2.0.5+debian0/Horde_Editor-2.0.5/lib/Horde/Editor/Ckeditor.php
@@ -40,9 +40,27 @@ class Horde_Editor_Ckeditor extends Hord
             return;
         }
 
-        $ck_file = empty($params['basic'])
-            ? 'ckeditor/ckeditor.js'
-            : 'ckeditor/ckeditor_basic.js';
+        $ck_file = 'ckeditor/ckeditor.js' ;
+
+        if(isset($params['basic'])) {
+            $params['config']['toolbarGroups'] = [
+              (object)[ 'name' => 'document',    'groups' => [ 'mode', 'document', 'doctools' ] ],
+              (object)[ 'name' => 'clipboard',   'groups' => [ 'clipboard', 'undo' ] ],
+              (object)[ 'name' => 'editing',     'groups' => [ 'find', 'selection', 'spellchecker' ] ],
+              (object)[ 'name' => 'forms' ],
+              (object)[ 'name' => 'basicstyles', 'groups' => [ 'basicstyles', 'cleanup' ] ],
+              (object)[ 'name' => 'paragraph',   'groups' => [ 'list', 'indent', 'blocks', 'align', 'bidi' ] ],
+              (object)[ 'name' => 'links' ],
+              (object)[ 'name' => 'insert' ],
+              (object)[ 'name' => 'styles' ],
+              (object)[ 'name' => 'colors' ],
+              (object)[ 'name' => 'tools' ],
+              (object)[ 'name' => 'others' ],
+              (object)[ 'name' => 'about' ],
+            ];
+            $params['config']['removeButtons'] = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';
+            $params['config']['removeDialogTabs'] = 'link:advanced';
+        }
 
         if (isset($params['config'])) {
             if (is_array($params['config'])) {