Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CodeMirror twig ? #118

Open
guldil opened this issue Aug 12, 2020 · 0 comments
Open

Use CodeMirror twig ? #118

guldil opened this issue Aug 12, 2020 · 0 comments

Comments

@guldil
Copy link

guldil commented Aug 12, 2020

Hello,

On a symfony 3.4 with KMS Froala 2.9.8 i'm tring to use Twig : https://codemirror.net/mode/twig/index.html

$builder->add('twigContent', FroalaEditorType::class, array('codeMirrorOptions' => array(
                'indentWithTabs' => true,
                'lineNumbers' => true,
                'lineWrapping' => true,
                'mode'=> array('name' => "twig", 'base' => "text/html"),
                'tabMode' => 'indent',
                'tabSize' => 2
            )
            , 'label' => 'Contenu', 'attr' => array('class' => 'froalaMailTransTemplate', 'id' => 'froalaMailTransTemplate'), 'required' => false))

if i remove the code 'mode'=> array('name' => "twig", 'base' => "text/html") it's working i have HTML but no "twig" markup

What did i miss ?

thanks

Guldil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant