09-13-2019, 01:02 AM
iw15.1.4
I have incorporated the Monaco editor (the same editor that runs vs code) into an iw application using the ajaxCall function.
Everything works nicely when i use normal words. However, when I try to pass html data back to IW, then I get an error.
How would I pass back "raw" text using the ajaxCall function? Do I need to wrap it in something?
Here is the example.
First here is my function call on the onclick
function (e){
ajaxCall("ajaxSaveCode",
"&code='"+monaco.editor.getModels()[0].getValue()+"'",
false,
function(response){
});
return true;
}
If I try to send the following text back to IW then I get an error.
<html>
<body>
<h1>Test Header</h1>
</body>
</html>
The error that I get says
127.0.0.1:8888 says
Ajax request failed: The application server did not respond.
URL:/21341234213/$/callback?
callback=ajaxSaveCode&code='<html>
<body>
<h1>Test header</h1>
</body>
</html>'&. . . . .
As I said before if the text is just words with the html tags then it works as expected.
I have incorporated the Monaco editor (the same editor that runs vs code) into an iw application using the ajaxCall function.
Everything works nicely when i use normal words. However, when I try to pass html data back to IW, then I get an error.
How would I pass back "raw" text using the ajaxCall function? Do I need to wrap it in something?
Here is the example.
First here is my function call on the onclick
function (e){
ajaxCall("ajaxSaveCode",
"&code='"+monaco.editor.getModels()[0].getValue()+"'",
false,
function(response){
});
return true;
}
If I try to send the following text back to IW then I get an error.
<html>
<body>
<h1>Test Header</h1>
</body>
</html>
The error that I get says
127.0.0.1:8888 says
Ajax request failed: The application server did not respond.
URL:/21341234213/$/callback?
callback=ajaxSaveCode&code='<html>
<body>
<h1>Test header</h1>
</body>
</html>'&. . . . .
As I said before if the text is just words with the html tags then it works as expected.