Added an "twig" lines mode, where the label lines are processed via a sandboxed twig.

This commit is contained in:
Jan Böhmer 2020-05-06 22:44:21 +02:00
parent c2db827c9d
commit 11225eb9cc
11 changed files with 548 additions and 7 deletions

View file

@ -83,6 +83,10 @@ function findLabelForPlaceholder(search)
}
}
//Dont escape text inside of twig blocks
CKEDITOR.config.protectedSource.push(/\{\{[\s\S]*?\}\}/g);
CKEDITOR.config.protectedSource.push(/\{\%[\s\S]*?%\}/g);
CKEDITOR.plugins.add('partdb_label', {
hidpi: true,
icons: 'placeholder',