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

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

allowedContent: true,

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

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:

/* 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-schnipsel/redaxo/ckeditor.txt · Last modified: 2024/01/05 13:07 by 127.0.0.1