Change EasyAdmin TextArea CodeMirror Value/Text with JS

Good afternoon,

I have a form with several CodeEditor Fields …. I require by JS, modify the value of some of them … I was validating and they are generated with CodeMirror … but when I try to access this object it tells me that it is not defined.

Input Form:
CodeEditorField::new(‘NAME’);

JS:
const editor = CodeMirror.fromTextArea(‘NAME_ID’);

What would be the correct way, to update its value with javascript ?, Thanks

enter image description here

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *