Skip to content

InputfieldCKEditor 'extraAllowedContent': empty module config setting prevents use of config.js #627

@Toutouwai

Description

@Toutouwai

Short description of the issue

When the InputfieldCKEditor module config field for "Extra Allowed Content" is empty, the module includes this as an empty string in the inline Javascript configuration for the field.

2018-06-28_155653

2018-06-28_155803

This prevents or overrides any extraAllowedContent option that might be defined for the field in config.js

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here. For example:
    config.extraAllowedContent = 'p(tip)';
};

Suggestion for a possible fix

Somewhere in InputfieldCKEditor::renderReady before the $settings array is passed to $config->js...

if(empty($settings['extraAllowedContent'])) unset($settings['extraAllowedContent']);

Setup/Environment

  • ProcessWire version: 3.0.106

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions