Closed bricebou closed 2 years ago
I don't know what to say. It looks very strange that the <script>
tag disappears. EasyAdmin doesn't process Twig form templates in any way, because we rely on Symfony for this. I'm sorry but I'm confused about this, so I'm afraid I can't help you much 😐
Hi,
Thanks for your reply !
I'll give it another try, working back on a personal project these days. But the <script>
tag doesn't disappear when the ReclicEasyMDEType is called outside of EasyAdmin. I'll make more tests and come back here to post the outcome.
Otherwise, maybe I'll find another way to add a Markdown editor within my forms.
Thanks again :-)
add a Markdown editor within my forms
How about CodeEditorField which is configured for Markdown by default (same as setting ->setLanguage('markdown')
explicitly) ?
How about CodeEditorField which is configured for Markdown by default (same as setting
->setLanguage('markdown')
explicitly) ?
I'll give it a try, but I need to check how the data is stored... Thanks :-)
Let's close this because the built-in code editor field could be enough for this use case. Thanks.
Describe the bug I'm trying to use the EasyMDE Bundle (https://packagist.org/packages/reclic/easymde-bundle) that enhances textarea fields with a javascript markdown editor.
When the
ReclicEasyMDEType
is called, the following template is called :But the script tag is removed when EasyAdmin renders the form.
To Reproduce Using EasyAdmin Bundle version 4: in a CrudController, I'm trying to call the ReclicEasyMDEType :
The
Type/QuoteType.php
contains this:The ReclicEasyMDEType template is loaded but the script tag is stripped ; here is what it's rendered:
There should be a script for each ReclicEasyMDEType...
Is there any option I can use to avoid the script content to be stripped ?
Thanks !