Download the PHP package oberon/quill-delta without Composer
On this page you can find all versions of the php package oberon/quill-delta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download oberon/quill-delta
More information about oberon/quill-delta
Files in oberon/quill-delta
Download oberon/quill-delta
More information about oberon/quill-delta
Files in oberon/quill-delta
Vendor oberon
Package quill-delta
Short Description Compose the deltas of a quill editor history ops array. Port of npm library quill-delta
License MIT
Homepage https://github.com/jurriaanr/quill-delta
Package quill-delta
Short Description Compose the deltas of a quill editor history ops array. Port of npm library quill-delta
License MIT
Homepage https://github.com/jurriaanr/quill-delta
Please rate this library. Is it a good library?
Informations about the package quill-delta
Quill Delta
This is a PHP port of the npm library quill-delta. Right now it only ports the compose function to compose the full history including all the retains and deletes to a final version with only the necessary inserts.
installation
Use composer
composer require oberon/quill-delta
usage
use Oberon\Quill\Delta\Composer;
$fullOps = [
[
"ops" => [
["insert" => "hello"],
],
],
[
"ops" => [
["retain" => 5],
["insert" => " world"],
],
],
];
$quilComposer = new Composer();
echo $quilComposer->compose($fullOps);
// {"ops":[{"insert":"hello world"}]}
or
use Oberon\Quill\Delta\Delta;
$fullOps = [
[
"ops" => [
["insert" => "hello"],
],
],
[
"ops" => [
["retain" => 5],
["insert" => " world"],
],
],
];
$output = array_reduce($fullOps, function(Delta $delta, $ops){
$comp = $delta->compose(new Delta($ops));
return $comp;
}, new Delta());
echo $output;
// {"ops":[{"insert":"hello world"}]}
notes
* only supports the delta compose method, diff and other utilities are not supported
All versions of quill-delta with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.0
The package oberon/quill-delta contains the following files
Loading the files please wait ....