942 lines
40 KiB
HTML
942 lines
40 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<base data-ice="baseUrl" href="../">
|
|
<title data-ice="title">Typedef | yjs</title>
|
|
<link type="text/css" rel="stylesheet" href="css/style.css">
|
|
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
|
|
<script src="script/prettify/prettify.js"></script>
|
|
<script src="script/manual.js"></script>
|
|
<meta name="description" content="A framework for real-time p2p shared editing on any data"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="yjs"><meta property="twitter:description" content="A framework for real-time p2p shared editing on any data"></head>
|
|
<body class="layout-container" data-ice="rootContainer">
|
|
|
|
<header>
|
|
<a href="./">Home</a>
|
|
|
|
<a href="identifiers.html">Reference</a>
|
|
<a href="source.html">Source</a>
|
|
|
|
<div class="search-box">
|
|
<span>
|
|
<img src="./image/search.png">
|
|
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
|
|
</span>
|
|
<ul class="search-result"></ul>
|
|
</div>
|
|
<a style="position:relative; top:3px;" href="https://github.com/y-js/yjs.git"><img width="20px" src="./image/github.png"></a></header>
|
|
|
|
<nav class="navigation" data-ice="nav"><div>
|
|
<ul>
|
|
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Connector.js~AbstractConnector.html">AbstractConnector</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Persistence.js~AbstractPersistence.html">AbstractPersistence</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Transaction.js~Transaction.html">Transaction</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Y.js~Y.html">Y</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-encodable">encodable</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#bindings">Bindings</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Bindings/Binding.js~Binding.html">Binding</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#bindings-dombinding">Bindings/DomBinding</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Bindings/DomBinding/DomBinding.js~DomBinding.html">DomBinding</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-domToType">domToType</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-defaultFilter">defaultFilter</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-filterDomAttributes">filterDomAttributes</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAssociation">createAssociation</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-domsToTypes">domsToTypes</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeAssociation">removeAssociation</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-switchAssociation">switchAssociation</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-FilterFunction">FilterFunction</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#bindings-quillbinding">Bindings/QuillBinding</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Bindings/QuillBinding/QuillBinding.js~QuillBinding.html">QuillBinding</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#bindings-textareabinding">Bindings/TextareaBinding</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Bindings/TextareaBinding/TextareaBinding.js~TextareaBinding.html">TextareaBinding</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#messagehandler">MessageHandler</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fromBinary">fromBinary</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toBinary">toBinary</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-readDeleteSet">readDeleteSet</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-stringifyDeleteSet">stringifyDeleteSet</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-writeDeleteSet">writeDeleteSet</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-integrateRemoteStructs">integrateRemoteStructs</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-stringifyStructs">stringifyStructs</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-logID">logID</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-messageToRoomname">messageToRoomname</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-messageToString">messageToString</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-readStateSet">readStateSet</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-writeStateSet">writeStateSet</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-readSyncStep1">readSyncStep1</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendSyncStep1">sendSyncStep1</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-stringifySyncStep1">stringifySyncStep1</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-readSyncStep2">readSyncStep2</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-stringifySyncStep2">stringifySyncStep2</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#store">Store</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Store/DeleteStore.js~DeleteStore.html">DeleteStore</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Store/OperationStore.js~OperationStore.html">OperationStore</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Store/StateStore.js~StateStore.html">StateStore</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#struct">Struct</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/GC.js~GC.html">GC</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/Item.js~Item.html">Item</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/ItemEmbed.js~ItemEmbed.html">ItemEmbed</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/ItemFormat.js~ItemFormat.html">ItemFormat</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/ItemJSON.js~ItemJSON.html">ItemJSON</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/ItemString.js~ItemString.html">ItemString</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Struct/Type.js~Type.html">Type</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getListItemIDByPosition">getListItemIDByPosition</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#types-yarray">Types/YArray</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YArray/YArray.js~YArray.html">YArray</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YArray/YArray.js~YArrayEvent.html">YArrayEvent</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#types-ymap">Types/YMap</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YMap/YMap.js~YMap.html">YMap</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YMap/YMap.js~YMapEvent.html">YMapEvent</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#types-ytext">Types/YText</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YText/YText.js~YText.html">YText</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-Delta">Delta</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-TextAttributes">TextAttributes</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#types-yxml">Types/YXml</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YXml/YXmlElement.js~YXmlElement.html">YXmlElement</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YXml/YXmlFragment.js~YXmlFragment.html">YXmlFragment</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YXml/YXmlHook.js~YXmlHook.html">YXmlHook</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YXml/YXmlText.js~YXmlText.html">YXmlText</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Types/YXml/YXmlTreeWalker.js~YXmlTreeWalker.html">YXmlTreeWalker</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-CSS_Selector">CSS_Selector</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-CSS_Selector">CSS_Selector</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#util">Util</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/EventHandler.js~EventHandler.html">EventHandler</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/NamedEventHandler.js~NamedEventHandler.html">NamedEventHandler</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/Tree.js~Tree.html">Tree</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/UndoManager.js~UndoManager.html">UndoManager</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/YEvent.js~YEvent.html">YEvent</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-defragmentItemContent">defragmentItemContent</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-generateRandomUint32">generateRandomUint32</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isParentOf">isParentOf</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createMutualExclude">createMutualExclude</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fromRelativePosition">fromRelativePosition</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getRelativePosition">getRelativePosition</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-simpleDiff">simpleDiff</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-registerStruct">registerStruct</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-AbsolutePosition">AbsolutePosition</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-RelativePosition">RelativePosition</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-typedef">T</span><span data-ice="name"><span><a href="typedef/index.html#static-typedef-SimpleDiff">SimpleDiff</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#util-binary">Util/Binary</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/Binary/Decoder.js~BinaryDecoder.html">BinaryDecoder</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/Binary/Encoder.js~BinaryEncoder.html">BinaryEncoder</a></span></span></li>
|
|
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#util-id">Util/ID</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/ID/ID.js~ID.html">ID</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/Util/ID/RootID.js~RootID.html">RootID</a></span></span></li>
|
|
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-RootFakeUserID">RootFakeUserID</a></span></span></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="content" data-ice="content"><h1 data-ice="title">Typedef</h1>
|
|
<div data-ice="summaries"><table class="summary" data-ice="summary">
|
|
<thead><tr><td data-ice="title" colspan="3">Static Public Summary</td></tr></thead>
|
|
<tbody>
|
|
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-AbsolutePosition">AbsolutePosition</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-CSS_Selector">CSS_Selector</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>Define the elements to which a set of CSS queries apply.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-CSS_Selector">CSS_Selector</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>Define the elements to which a set of CSS queries apply.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-Delta">Delta</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span><<span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>The Quill Delta format represents changes on a text document with
|
|
formatting information.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-FilterFunction">FilterFunction</a></span></span><span class="code" data-ice="signature">: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">function</a></span><span>(nodeName: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span>, attrs: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></span>)</span>: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></span></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">null</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>A filter defines which elements and attributes to share.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-RelativePosition">RelativePosition</a></span></span><span class="code" data-ice="signature">: <span><a href="typedef/index.html#static-typedef-encodable">encodable</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>A relative position that is based on the Yjs model.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-SimpleDiff">SimpleDiff</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>A SimpleDiff describes a change on a String.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-TextAttributes">TextAttributes</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>Attributes that can be assigned to a selection of text.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="target">
|
|
<td>
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
<span class="override" data-ice="override"></span>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>
|
|
|
|
|
|
|
|
<span class="code" data-ice="name"><span><a href="typedef/index.html#static-typedef-encodable">encodable</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
|
|
|
|
<div data-ice="description"><p>Anything that can be encoded with <code>JSON.stringify</code> and can be decoded with
|
|
<code>JSON.parse</code>.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div data-ice="details"><h2 data-ice="title">Static Public </h2>
|
|
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-AbsolutePosition">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">AbsolutePosition</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Util/relativePosition.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="properties"><div data-ice="properties">
|
|
<h4 data-ice="title">Properties:</h4>
|
|
<table class="params">
|
|
<thead>
|
|
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr data-ice="property" data-depth="0">
|
|
<td data-ice="name" class="code" data-depth="0">type</td>
|
|
<td data-ice="type" class="code"><span>YType</span></td>
|
|
<td data-ice="appendix"></td>
|
|
<td data-ice="description"><p>The type on which to apply the absolute position.</p>
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="property" data-depth="0">
|
|
<td data-ice="name" class="code" data-depth="0">offset</td>
|
|
<td data-ice="type" class="code"><span>Integer</span></td>
|
|
<td data-ice="appendix"></td>
|
|
<td data-ice="description"><p>The absolute offset.r</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-CSS_Selector">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">CSS_Selector</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Types/YXml/YXmlFragment.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>Define the elements to which a set of CSS queries apply.
|
|
{@link <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}</a></p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode"> query = '.classSelector'
|
|
query = 'nodeSelector'
|
|
query = '#idSelector'</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-CSS_Selector">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">CSS_Selector</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Types/YXml/YXmlTreeWalker.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>Define the elements to which a set of CSS queries apply.
|
|
{@link <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}">https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors|CSS_Selectors}</a></p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode"> query = '.classSelector'
|
|
query = 'nodeSelector'
|
|
query = '#idSelector'</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-Delta">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">Delta</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span><<span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Types/YText/YText.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>The Quill Delta format represents changes on a text document with
|
|
formatting information. For mor information visit {@link <a href="https://quilljs.com/docs/delta/|Quill">https://quilljs.com/docs/delta/|Quill</a> Delta}</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode"> {
|
|
ops: [
|
|
{ insert: 'Gandalf', attributes: { bold: true } },
|
|
{ insert: ' the ' },
|
|
{ insert: 'Grey', attributes: { color: '#cccccc' } }
|
|
]
|
|
}</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-FilterFunction">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">FilterFunction</span><span class="code" data-ice="signature">: <span><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">function</a></span><span>(nodeName: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span>, attrs: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></span>)</span>: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></span></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">null</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Bindings/DomBinding/DomBinding.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>A filter defines which elements and attributes to share.
|
|
Return null if the node should be filtered. Otherwise return the Map of
|
|
accepted attributes.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-RelativePosition">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">RelativePosition</span><span class="code" data-ice="signature">: <span><a href="typedef/index.html#static-typedef-encodable">encodable</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Util/relativePosition.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>A relative position that is based on the Yjs model. In contrast to an
|
|
absolute position (position by index), the relative position can be
|
|
recomputed when remote changes are received. For example:</p>
|
|
<p><code>Insert(0, 'x')('a|bc') = 'xa|bc'</code> Where | is the cursor position.</p>
|
|
<p>A relative cursor position can be obtained with the function
|
|
<span><a href="function/index.html#static-function-getRelativePosition">getRelativePosition</a></span> and it can be transformed to an absolute position
|
|
with <span><a href="function/index.html#static-function-fromRelativePosition">fromRelativePosition</a></span>.</p>
|
|
<p>Pro tip: Use this to implement shared cursor locations in YText or YXml!
|
|
The relative position is <span><a href="typedef/index.html#static-typedef-encodable">encodable</a></span>, so you can send it to other
|
|
clients.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode">// Current cursor position is at position 10
|
|
let relativePosition = getRelativePosition(yText, 10)
|
|
// modify yText
|
|
yText.insert(0, 'abc')
|
|
yText.delete(3, 10)
|
|
// Compute the cursor position
|
|
let absolutePosition = fromRelativePosition(y, relativePosition)
|
|
absolutePosition.type // => yText
|
|
console.log('cursor location is ' + absolutePosition.offset) // => cursor location is 3</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-SimpleDiff">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">SimpleDiff</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Util/simpleDiff.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>A SimpleDiff describes a change on a String.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties"><div data-ice="properties">
|
|
<h4 data-ice="title">Properties:</h4>
|
|
<table class="params">
|
|
<thead>
|
|
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr data-ice="property" data-depth="0">
|
|
<td data-ice="name" class="code" data-depth="0">pos</td>
|
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span></td>
|
|
<td data-ice="appendix"></td>
|
|
<td data-ice="description"><p>The index where changes were applied</p>
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="property" data-depth="0">
|
|
<td data-ice="name" class="code" data-depth="0">delete</td>
|
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span></td>
|
|
<td data-ice="appendix"></td>
|
|
<td data-ice="description"><p>The number of characters to delete starting
|
|
at <code>index</code>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr data-ice="property" data-depth="0">
|
|
<td data-ice="name" class="code" data-depth="0">insert</td>
|
|
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></td>
|
|
<td data-ice="appendix"></td>
|
|
<td data-ice="description"><p>The new text to insert at <code>index</code> after applying
|
|
<code>delete</code></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode">console.log(a) // the old value
|
|
console.log(b) // the updated value
|
|
// Apply changes of diff (pseudocode)
|
|
a.remove(diff.pos, diff.remove) // Remove `diff.remove` characters
|
|
a.insert(diff.pos, diff.insert) // Insert `diff.insert`
|
|
a === b // values match</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-TextAttributes">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">TextAttributes</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Types/YText/YText.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>Attributes that can be assigned to a selection of text.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div data-ice="example">
|
|
<h4>Example:</h4>
|
|
|
|
<div class="example-doc" data-ice="exampleDoc">
|
|
|
|
<pre class="prettyprint source-code"><code data-ice="exampleCode"> {
|
|
bold: true,
|
|
font-size: '40px'
|
|
}</code></pre>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="detail" data-ice="detail">
|
|
<h3 data-ice="anchor" id="static-typedef-encodable">
|
|
<span class="access" data-ice="access">public</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="code" data-ice="name">encodable</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span> | <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></span>
|
|
<span class="right-info">
|
|
|
|
|
|
<span data-ice="source"><span><a href="file/src/Y.js.html#lineNumberundefined">source</a></span></span>
|
|
</span>
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<div data-ice="description"><p>Anything that can be encoded with <code>JSON.stringify</code> and can be decoded with
|
|
<code>JSON.parse</code>.</p>
|
|
<p>The following property should hold:
|
|
<code>JSON.parse(JSON.stringify(key))===key</code></p>
|
|
<p>At the moment the only safe values are number and string.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div data-ice="properties">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.0.4)</span><img src="./image/esdoc-logo-mini-black.png"></a>
|
|
</footer>
|
|
|
|
<script src="script/search_index.js"></script>
|
|
<script src="script/search.js"></script>
|
|
<script src="script/pretty-print.js"></script>
|
|
<script src="script/inherited-summary.js"></script>
|
|
<script src="script/test-summary.js"></script>
|
|
<script src="script/inner-link.js"></script>
|
|
<script src="script/patch-for-local.js"></script>
|
|
</body>
|
|
</html>
|