利用 kindeditor 编辑器提交内容到 php
在使用 kindeditor 富文本编辑器与 php form 进行提交时,获取编辑器内容需要采用特定的方法。
在您的 html 表单中,使用如下代码配置 kindeditor:
<textarea id="editor1" name="con" style="width:700px;height:200px;"></textarea>
确保您的表单包含一个 submit 按钮。
在 php 脚本中,可以使用 $_post[‘con’] 获取 kindeditor 编辑器中的内容:
<?phpif (isset($_POST[‘con’])) { // 获取编辑器中的内容并保存到 $content 变量 $content = $_POST[‘con’];}?>
通过上述步骤,您便可以成功从 kindeditor 编辑器中获取内容并保存在 php 变量中。
以上就是如何用PHP获取KindEditor编辑器提交的内容?的详细内容,更多请关注范的资源库其它相关文章!
转载请注明:范的资源库 » 如何用PHP获取KindEditor编辑器提交的内容?