trsteel88 / TrsteelCkeditorBundle

Symfony2 bundle for easy integration of the CKEditor WYSIWYG
97 stars 58 forks source link

Fix for extra_allowed_content evaluating to true. #103

Closed jbartfay closed 8 years ago

jbartfay commented 8 years ago

In twig, non-empty strings always evaluate to true. So, to check if a variable is true vs. a non-empty string, we need to use a different syntax.

This config:

# app/config/config.yml
trsteel_ckeditor:
    extra_allowed_content: "div(*)"

Should output:

var trsteelConfig = {
    // ...
    extraAllowedContent: 'div(*)',
    // ...
};