Closed ncrocfer closed 6 years ago
I don't know that extension, have you contact the creator and asked for some input or a fix?
Oups, no sorry I misspoke. The problem is not the extension, I have the same behaviour with a simple "textarea" type in the form definition.
I should not have talked about codemirror :)
My question is : how to send raw JSON data please ?
The easiest way would be to use an extension applied to a textarea that then updates the model. It wouldn't be hard to do, similar to writing a normal bit of code in angular only you turn it into a ccomponent, the framework is ultimately an angular template manager after all. If you take a look at the calculate extension in the example/add-on folder you can see how you can add whatever you like in a template and then add any required directives to it. If you want to start with the template used for a text area then you can manipulate it to do what you want it to.
Ok great, I'll do it ! Thanks for your answer :)
Hello,
I'm trying to allow my users to send raw JSON in a field, using the CodeMirror extension (https://github.com/philippbosch/angular-schema-form-ui-codemirror).
Unfortunately the data is not validated as a valid JSON :![codemirror_object](https://user-images.githubusercontent.com/1552526/36498025-6414bc3c-173d-11e8-9741-e10daf67c18d.png)
Here is my schema :
And my form :
When I change the type for string type, the JS validation is ok but as I'm also using the schema in the Python backend, it's also failing :)
Thank you for your help, and thanks also for this great module !