Why Cl Editor can not Working In Popup. may be its work sometime
This is the code i can run in popup using ajax: Its May be Some time working or some time can not work: List.php can display list of job. on tr td tag.
List.php
<div id="default-modal" class="modal fade" tabindex="-1" role="dialog"></div>
<td width="5%" class="text-center"><a onclick="show_popup(<?php echo $id; ?>)" rel="<?php echo $id; ?>" class="btn btn-default btn-xs btn-icon"><i class="icon-file6"></i></a></td>
<script type="text/javascript">
function show_popup(id)
{
$('#default-modal').modal('show');
$.ajax({
url: 'job_popup.php',
type: 'post',
data: {id:id},
cache: false,
success: function(response)
{
$('#default-modal').html(response);
}
});
}
job_popup.php
<link rel="stylesheet" href="cleditor/jquery.cleditor.css" />
<script src="cleditor/jquery.cleditor.js"></script>
<script src="cleditor/jquery.cleditor.min.js"></script>
<script>
$(document).ready(function () {
$("#desc").cleditor();
});
$('.form-control').each(function(){
this.contentEditable = true;
});
</script>
<textarea rows="5" cols="5" name="desc" id="desc" class="form-control"><?php echo $desc?> </textarea>

Try with adding editor's jQuery code (which is in document.ready function) in on click event of popup.