I use the quill editor
he is editing text in the DIV area
<div id="editor" class="ql-editor"></div>
<input type="hidden" name="content" id="content">
ajax
$("-sharpform").submit(function(e){
// ...
var formData = new FormData($("-sharpform")[0]);
formData.append("content", document.querySelector(".ql-editor").innerHTML);
$.ajax({
type:"POST",
url:"xxx.php,
data: formData,
enctype: "multipart/form-data",
cache: false,
contentType: false,
processData: false,
success:function(data){
//...
}
});
I will first send the contents of ql-editor to content
in the list, and then process
to php, but now there is a problem because quill uploads content using base64
, so I make an error when I upload content to input value
because there is an attachment method of
, so there is no way to directly use
to use
on input"s value profile. How can I solve this problem?
how can I get ajax to catch data and send it to php for processing without having to send div-sharpeditor value to input-sharpcontent?