Php 从div获取表单输入laravel的内容
我有一个使用CKEditor的laravel表单(不使用blade)。当我提交表单时,我试图在一个名为Php 从div获取表单输入laravel的内容,php,laravel,input,ckeditor,Php,Laravel,Input,Ckeditor,我有一个使用CKEditor的laravel表单(不使用blade)。当我提交表单时,我试图在一个名为editorcontents的div中从中获取内容,因为表单提交博客文章(因此它也需要该div的格式) 我尝试给div分配一个名称,但没有成功。如何将div用作输入字段 <div id="editorcontents" name="editorcontents"> </div> $content = Input::get('editorcontents'); retur
editorcontents
的div
中从中获取内容,因为表单提交博客文章(因此它也需要该div的格式)
我尝试给div分配一个名称
,但没有成功。如何将div
用作输入
字段
<div id="editorcontents" name="editorcontents">
</div>
$content = Input::get('editorcontents');
return $content;
$content=Input::get('editorcontents');
返回$content;
在jQuery中尝试使用ajax获取编辑器内容的html内容,并将其发布到服务器中的控制器:)。。。我希望这有帮助
Html
您是否尝试过使用ajax来发布div:)的值,并尝试为此远离ajax。我可以用ajax来做,但是有人告诉我要坚持使用PHP。你知道CKEditer的函数正在运行吗?CKEditor在JQuery中运行,但是为了传递信息,我被告知要使用PHP,所以我想坚持使用PHP。你能给我一个你尝试使用的示例表单吗?我正在尝试远离ajax,但在这种情况下,EditorContent的字符串可以有多长?因为我最初尝试使用它,但是如果字符串太长,它将不返回任何内容,但是当尝试发布+-1000行时,它反而发送了一个空字符串?您是否设置:php\u value post\u max\u sizeI已编辑我的答案:editorcontents:escape(inputValue)flow此问题:
<div id="editorcontents" name="editorcontents">
</div>
var inputValue = $("#editorcontents").html;
$.ajax( {
type : "POST",
cache : false,
async : true,
global : false,
url : "URL POST DATA",
data : {
editorcontents : escape(inputValue),
}
} ).done( function ( data )
{
//Handle event send done;
} )