Integrating a Custom Security Filter with the CKEditor Module (Open Source Version)

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

important note

This section is dedicated for the developers of security filter modules.


Integrating your application with the CKEditor module by adding a security filter works through a special hook. An example of the hook is shown below:

function MODULENAME_ckeditor_security_filter() {
    return array(
        'security_filter_name' => array(
            // Security filter title - it will be displayed in the "Security > Security filters" section of profile settings.
            'title' => t('Security filter title'),
            // Security filter description - it will be displayed in the "Security > Security filters" section of profile settings.
            'description' => t('Security filter description'),
        )
    );
}

Please note that MODULENAME in the code above is the name of the module.

After the hook is used the security filter will automatically appear on the filters list for each CKEditor profile where you will be able to enable it.

This page was last edited on 31 May 2012, at 12:32.