Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
code-schnipsel:redaxo:ckeditor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
code-schnipsel:redaxo:ckeditor [2018/08/09 08:05] tietzcode-schnipsel:redaxo:ckeditor [2024/01/05 13:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== CKEditor für Redaxo 5.x ======
 +
 +===== Alle HTML-Elemente zulassen =====
 +Wenn der CKEditor HTML-Elemente entfernt (macht er übrigens nur, wenn der Editor geladen wird, also beim Editieren eines Textes und nicht beim speichern!) hilft folgendes:\\
 +Linke Spalte unter AddOns->CKEditor ... Reiter Profile->Profil auswählen und dort bei **JavaScript Config Objekt**<code>allowedContent: true,</code> hinzufügen. Das bewirkt, das ALLE HTML-Elemente zugelassen werden. Könnte also evtl. ein Sicherheitsrisiko sein.\\
 +https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html
 +\\ \\
 +
 +
 +===== Link per Default in neuem Fenster öffnen lassen =====
 +
 +Siehe: http://handsomedogstudio.com/ckeditor-set-default-target-blank \\
 +In die Datei //assests/ckeditor/vendor/plugins/link/dialogs/**link.js**// folgenden Code am Ende der Datei einfügen:
 +<code>
 +/* Here we are latching on an event ... in this case, the dialog open event */
 +
 +CKEDITOR.on('dialogDefinition', function(ev) {
 +
 +    try {
 +
 +        /* this just gets the name of the dialog */
 +
 +var dialogName = ev.data.name;
 +
 +/* this just gets the contents of the opened dialog */
 +
 +var dialogDefinition = ev.data.definition;
 +
 + 
 +
 +/* Make sure that the dialog opened is the link plugin ... otherwise do nothing */
 +
 +if(dialogName == 'link') {
 +
 +    /* Getting the contents of the Target tab */
 +
 +    var informationTab = dialogDefinition.getContents('target');
 +
 +    /* Getting the contents of the dropdown field "Target" so we can set it */
 +
 +    var targetField = informationTab.get('linkTargetType');
 +
 +    /* Now that we have the field, we just set the default to _blank
 +
 +    A good modification would be to check the value of the URL field
 +
 +    and if the field does not start with "mailto:" or a relative path,
 +
 +    then set the value to "_blank" */
 +
 +    targetField['default'] = '_blank';
 +
 +}
 +
 +    } catch(exception) {
 +
 +        alert('Error ' + ev.message);
 +
 +    }
 +
 +});
 +</code>