0
I’m building a posting page I’m having a hard time implementing when picking up content.
- Quill
- Publisher
Thanks in advance for your help!
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
<!--Função que manda o conteúdo da div para a textarea com o clique do botão-->
<script>
$(() => {
$('#saveDelta').click(() => {
var valorDaDiv = $("#editor")
$("#post").val(valorDaDiv)
})
})
</script>
<!--div que contem o valor a ser repassa a textarea-->
<div id="editor" class="texteditor"><b>Digite o texto aqui!</b></div> <br>
<!-- form que com o botão que pega o conteúdo da div atualiza a textarea e salva no banco -->
<form action="/admin/novo_post" id="post" method="POST">
<textarea name="post" id="post" cols="30" rows="10"></textarea>
<br>
<button type="submit" id="saveDelta">Salvar</button>
</form>
<!--Quando retiro o form atualiza a textarea mas não salva no banco com o form o conteúdo da div não vem e salva a textarea no banco em branco-->
<script>
var quill = new Quill('#editor', {
theme: 'snow'
});
</script>
how could I be recovering images passed by that editor Quill ?
– Elton A. Pering
you want to take the path of images?
– Sam
actually write to the server. how does this guy here http://codepen.io/jackmu95/pen/EgBKZr, as per this Issue: https://github.com/quilljs/quill/issues/1089 . But for me it does not fire the event imageHandler
– Elton A. Pering
You need to upload the image to some server. In the example you passed, it seems to me that it uses an API that sends the image to a server. I don’t know how this works.
– Sam