duanmanpi9358 2017-03-30 10:31
浏览 136

Quill - JSON> PHP> MYSQL - 如何将数据从quill解析为php进行处理?

Wizzards :)

I really want to use Quill richtext editor but I have no real knowledge of JSON or how is parses the so called "Deltas".

Basically, I need to collect the page from the editor and process it with php before storing it in the mysql database, and, from the database back to the editor if user wishes to update an existing post. It needs to be able to parse text and multiple images...

I don't have 3 months a piece to learn js/json, can anyone help me out with this one? Thank youuu!

So acording to the Quill documentation (https://quilljs.com/docs/api/) you can use var delta = quill.getContents(); to collect the data. Would it be something like this with an onclick() function? I dont even know with js if it has to be within a form? remember I don't know js :)

<script>
onclick(does this); // or can it be updated as the user creates the document?
var delta = quill.getContents();
// what then?
</script>";

The php would require a different variable if each image to be processed, perhaps in an array?

<?php

$images = array();

$images[0] = 'json/delta/quill image?';
$images[1] = 'etc...';
$images[2] = 'etc...';
$images[2] = 'wtf...';

?>

Why on earth they don't have a simple example of how to do this I don't know, its an all too common problem with these things.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类