I'm working on a control panel for the site where the news posts are made.
By it you can edit the news if necessary, I'm using CKEDITOR
in my textarea
, the query is done with ajax
/ php
, but I can not play searched text in banco
for editing back in textarea
with CKEDITOR
. Can someone give me strength?
function editaTextoNoticia(idd) {
var url = "buscaEditarTextoNoticia.php?id=" + idd;
req2.open("Get", url, true);
req2.onreadystatechange = function() {
if (req2.readyState == 1) {
document.getElementById('textoEditar').innerHTML = 'Carregando...';
}
if (req2.readyState == 4 && req2.status == 200) {
var resposta = req2.responseText;
CKEDITOR.instances.textoEditar.updateElement();
}
};
req2.send(null);
}