gpt4 book ai didi

javascript - Cl 编辑器在默认模式弹出窗口中不起作用

转载 作者:行者123 更新时间:2023-11-29 11:04:03 25 4
gpt4 key购买 nike

为什么 Cl 编辑器无法在弹出窗口中工作。有时可能是它的工作

Here Cl editor Image

这是我可以使用 ajax 在弹出窗口中运行的代码:它可能有时工作,有时不工作:List.php可以显示作业列表。在 tr td 标签上。

列表.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>

最佳答案

尝试在弹出窗口的单击事件中添加编辑器的 jQuery 代码(位于 document.ready 函数中)。

关于javascript - Cl 编辑器在默认模式弹出窗口中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41714664/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com