mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
Added docs as asciidoctor with cross platform support. (#5733)
* Added docs as asciidoctor with cross platform support. * Fixed release script with new doc building mechanism.
This commit is contained in:
parent
d6c0badfd4
commit
dc0db68515
30 changed files with 1412 additions and 861 deletions
46
doc/api/changeset_library.adoc
Normal file
46
doc/api/changeset_library.adoc
Normal file
|
@ -0,0 +1,46 @@
|
|||
== Changeset Library
|
||||
|
||||
The https://github.com/ether/etherpad-lite/blob/develop/src/static/js/Changeset.js[changeset
|
||||
library]
|
||||
provides tools to create, read, and apply changesets.
|
||||
|
||||
=== Changeset
|
||||
|
||||
[source,javascript]
|
||||
----
|
||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
----
|
||||
|
||||
A changeset describes the difference between two revisions of a document. When a
|
||||
user edits a pad, the browser generates and sends a changeset to the server,
|
||||
which relays it to the other users and saves a copy (so that every past revision
|
||||
is accessible).
|
||||
|
||||
A transmitted changeset looks like this:
|
||||
|
||||
[source]
|
||||
----
|
||||
'Z:z>1|2=m=b*0|1+1$\n'
|
||||
----
|
||||
|
||||
=== Attribute Pool
|
||||
|
||||
[source,javascript]
|
||||
----
|
||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
||||
----
|
||||
|
||||
Changesets do not include any attribute key–value pairs. Instead, they use
|
||||
numeric identifiers that reference attributes kept in an https://github.com/ether/etherpad-lite/blob/develop/src/static/js/AttributePool.js[attribute pool].
|
||||
This attribute interning reduces the transmission overhead of attributes that
|
||||
are used many times.
|
||||
|
||||
There is one attribute pool per pad, and it includes every current and
|
||||
historical attribute used in the pad.
|
||||
|
||||
=== Further Reading
|
||||
|
||||
Detailed information about the changesets & Easysync protocol:
|
||||
|
||||
* https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-notes.pdf[Easysync Protocol]
|
||||
* https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-full-description.pdf[Etherpad and EasySync Technical Manual]
|
Loading…
Add table
Add a link
Reference in a new issue