Last active
March 30, 2018 08:51
-
-
Save sylvaincombes/19b756f17a7254cd682238ac7897a03c to your computer and use it in GitHub Desktop.
Symfony Ivory CkEditor protect twig syntax protectedSource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ivory_ck_editor: | |
configs: | |
default: | |
# ... | |
# protect twig syntax | |
entities: false | |
protectedSource: ["/\{\{[\s\S]*?\}\}/g", "/\{\%%[\s\S]*?\%%\}/g", "/\{\#[\s\S]*?\#\}/g"] | |
# @see http://ckeditor.com/addon/showprotected for a plugin with a visual indicator / editor of protected source if needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the tip !
Just one thing : each protected source marker should be wrapped with simple quotes, at least with symfony 3.4.6 :)
And I personnaly removed the
{{ }}
tags from theprotectedSource
config to let those parameters in the content area for end users