SetScriptJS

Converts a Lua script into a JavaScript-safe string format for the web editor by encoding it. Returns the encoded script that can be executed in the editor.

Usage:

Api.misc.SetScriptJS(string script);

Example:

string luaScript = "print('Hello, World!')";
string encodedScript = Api.misc.SetScriptJS(luaScript); 
// Returns: setText("print('Hello, World!')")

Last updated