\ is added in api explorer when field value has \

As you can see the field value is \ , but in the api explorer it’s exposed as \\. I’m working on math related thing, which I want the inputted field value as it’s without \ character. Eg, <p>\sqrt X</p> is the actual value in the editor, but from api explorer it’s, <p>\\sqrt X</p>\n. And this is not a valid Latex math expression.

I think that’s just JSON escaping. Normally a single backslash is reserved for escaping special characters, so when you want a literal backslash, the JSON escapes the backslash with another backslash. Nonetheless, when you try to access the actual field in Javascript, there should only be one slash.

But in the console:

If you don’t want the HTML tags and paragraphs either, set the field to a simple text area instead of HTML.


Yes @henok.tesfaye I agree with @roger

If you want to write latex you probably need to use a simple textarea, not HTML, as you need to write basically code, not formatted content.

Makes sense?

1 Like

Actually it’s a custom CKEditor + Mathtype plugin, I used HTML Editor for common case example. But using the CDA, I’m able to get the latex as it’s without escaping character, and this is eventually what I want. Thank you!

1 Like