
利用 kindeditor 编辑器提交内容到 php
在使用 kindeditor 富文本编辑器与 php form 进行提交时,获取编辑器内容需要采用特定的方法。
在您的 html 表单中,使用如下代码配置 kindeditor:
<textarea id="editor1" name="con" style="width:700px;height:200px;"></textarea>
确保您的表单包含一个 submit 按钮。
在 php 脚本中,可以使用 $_post['con'] 获取 kindeditor 编辑器中的内容:
立即学习“PHP免费学习笔记(深入)”;
<?php
if (isset($_POST['con'])) {
    // 获取编辑器中的内容并保存到 $content 变量
    $content = $_POST['con'];
}
?>通过上述步骤,您便可以成功从 kindeditor 编辑器中获取内容并保存在 php 变量中。
以上就是如何用PHP获取KindEditor编辑器提交的内容?的详细内容,更多请关注php中文网其它相关文章!
                        
                        PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号