I'm having trouble dynamically adding a script to a page.
The script I want to add is CKEDITOR (Text Editor).
I am able to add the Script, but I can not access the object of this Script after this action, the object that is created is CKEDITOR .
var script = document.createElement("script");
script.type = "text/javascript";
script.async = true; // Testei true e false e nada!
script.src = "objs/ckeditor/ckeditor.js";
document.getElementsByTagName("head")[0].appendChild(script);
When I try to print the object, the message that it returns is object not defined.
Does anyone have any suggestions?