froala / froala/KMSFroalaEditorBundle
Use CodeMirror twig ?
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting FroalaEditorType and how its codeMirrorOptions load and select CodeMirror modes, then reproduce the Symfony 3.4 configuration with the Twig mode from the linked CodeMirror page. Done means Twig markup is highlighted while the existing HTML editing behavior still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100