UNPKG

soocrate-core

Version:

this is the core of soocrate application

2,028 lines (1,165 loc) 47.4 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../../"> <title data-ice="title">EditorController | jquery-crate</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="Cratify tool that turns a division into a distributed and decentralized collaborative editor"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="jquery-crate"><meta property="twitter:description" content="Cratify tool that turns a division into a distributed and decentralized collaborative editor"></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/haouarin/jquery-crate.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/controller/editor.js~EditorController.html">EditorController</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-StatesHeader">StatesHeader</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><div class="header-notice"> <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import EditorController from &apos;<span><a href="file/controller/editor.js.html#lineNumber10">jquery-crate/controller/editor.js</a></span>&apos;</code></pre></div> <span data-ice="access">public</span> <span data-ice="kind">class</span> <span data-ice="source">| <span><a href="file/controller/editor.js.html#lineNumber10">source</a></span></span> </div> <div class="self-detail detail"> <h1 data-ice="name">EditorController</h1> <div class="description" data-ice="description"><p>EditorController this the link between the core functions and the interface.</p> </div> </div> <div data-ice="constructorSummary"><h2>Constructor Summary</h2><table class="summary" data-ice="summary"> <thead><tr><td data-ice="title" colspan="3">Public Constructor</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="class/controller/editor.js~EditorController.html#instance-constructor-constructor">constructor</a></span></span><span class="code" data-ice="signature">(model: <span>[doc]</span>, sessionID: <span>[string]</span>)</span> </p> </div> <div> <div data-ice="description"><p>[constructor description]</p> </div> </div> </td> <td> </td> </tr> </tbody> </table> </div> <div data-ice="memberSummary"><h2>Member Summary</h2><table class="summary" data-ice="summary"> <thead><tr><td data-ice="title" colspan="3">Public Members</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="class/controller/editor.js~EditorController.html#instance-member-markers">markers</a></span></span><span class="code" data-ice="signature">: <span><span>Marker</span><span>[]</span></span></span> </p> </div> <div> <div data-ice="description"><p>markers contains all marks of the users: carets, avatars...</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="class/controller/editor.js~EditorController.html#instance-member-model">model</a></span></span><span class="code" data-ice="signature">: <span>[doc]</span></span> </p> </div> <div> <div data-ice="description"><p>this is the object that contains all proprieties of a document.</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="class/controller/editor.js~EditorController.html#instance-member-startTimer">startTimer</a></span></span><span class="code" data-ice="signature">: <span>Timer</span></span> </p> </div> <div> <div data-ice="description"><p>startimer A timer used for sending pings</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="class/controller/editor.js~EditorController.html#instance-member-viewEditor">viewEditor</a></span></span><span class="code" data-ice="signature">: <span>Quill</span></span> </p> </div> <div> <div data-ice="description"><p> ViewEditor the used editor, here it is Quill editor </p> </div> </div> </td> <td> </td> </tr> </tbody> </table> </div> <div data-ice="methodSummary"><h2>Method Summary</h2><table class="summary" data-ice="summary"> <thead><tr><td data-ice="title" colspan="3">Public Methods</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="class/controller/editor.js~EditorController.html#instance-method-UpdateComments">UpdateComments</a></span></span><span class="code" data-ice="signature">()</span> </p> </div> <div> <div data-ice="description"><p>UpdateComments This function to extract the comments form the editor and show them in #comments</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="class/controller/editor.js~EditorController.html#instance-method-applyChanges">applyChanges</a></span></span><span class="code" data-ice="signature">(delta: <span>[type]</span>, iniRetain: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>applyChanges Send delta object with attributes character by character starting from the position &quot;iniRetain&quot; ]</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="class/controller/editor.js~EditorController.html#instance-method-atPing">atPing</a></span></span><span class="code" data-ice="signature">(origin: <span>[type]</span>, pseudo: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>atPing at the reception of ping</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="class/controller/editor.js~EditorController.html#instance-method-changeTitle">changeTitle</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>changeTitle For any change in title, broadcast the new title</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="class/controller/editor.js~EditorController.html#instance-method-cleanQuill">cleanQuill</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>cleanQuill description</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="class/controller/editor.js~EditorController.html#instance-method-copyLink">copyLink</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>copyLink copy the link of the document</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="class/controller/editor.js~EditorController.html#instance-method-loadDocument">loadDocument</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>loadDocument load the document if it exist in the local storage</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="class/controller/editor.js~EditorController.html#instance-method-remoteCaretMoved">remoteCaretMoved</a></span></span><span class="code" data-ice="signature">(range: <span>[type]</span>, origin: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>remoteCaretMoved At the reception of CARET position</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="class/controller/editor.js~EditorController.html#instance-method-remoteInsert">remoteInsert</a></span></span><span class="code" data-ice="signature">(element: <span>[type]</span>, indexp: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>remoteInsert At the reception of insert operation</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="class/controller/editor.js~EditorController.html#instance-method-remoteRemove">remoteRemove</a></span></span><span class="code" data-ice="signature">(index: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>remoteRemove At the reception of remove operation</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="class/controller/editor.js~EditorController.html#instance-method-saveDocument">saveDocument</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>saveDocument save the document in local storage</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="class/controller/editor.js~EditorController.html#instance-method-sendIt">sendIt</a></span></span><span class="code" data-ice="signature">(text: <span>[type]</span>, att: <span>[type]</span>, start: <span>[type]</span>, value: <span>[type]</span>, oper: <span>[type]</span>, retain: <span>[type]</span>, isItInsertWithAtt: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>sendIt Send the changes character by character </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="class/controller/editor.js~EditorController.html#instance-method-startPing">startPing</a></span></span><span class="code" data-ice="signature">(interval: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>startPing send periodically ping</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="class/controller/editor.js~EditorController.html#instance-method-stopPing">stopPing</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>stopPing stopPing</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="class/controller/editor.js~EditorController.html#instance-method-textChange">textChange</a></span></span><span class="code" data-ice="signature">(delta: <span>[type]</span>, oldDelta: <span>[type]</span>, source: <span>[type]</span>): <span>[type]</span></span> </p> </div> <div> <div data-ice="description"><p>textChange description</p> </div> </div> </td> <td> </td> </tr> </tbody> </table> </div> <div data-ice="constructorDetails"><h2 data-ice="title">Public Constructors</h2> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-constructor-constructor"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">constructor</span><span class="code" data-ice="signature">(model: <span>[doc]</span>, sessionID: <span>[string]</span>)</span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber18">source</a></span></span> </span> </h3> <div data-ice="description"><p>[constructor description]</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">model</td> <td data-ice="type" class="code"><span>[doc]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>this is the object that contains all proprieties of a document.</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">sessionID</td> <td data-ice="type" class="code"><span>[string]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> </div> </div> <div data-ice="memberDetails"><h2 data-ice="title">Public Members</h2> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-member-markers"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">markers</span><span class="code" data-ice="signature">: <span><span>Marker</span><span>[]</span></span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber31">source</a></span></span> </span> </h3> <div data-ice="description"><p>markers contains all marks of the users: carets, avatars...</p> </div> <div data-ice="properties"> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-member-model"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">model</span><span class="code" data-ice="signature">: <span>[doc]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber25">source</a></span></span> </span> </h3> <div data-ice="description"><p>this is the object that contains all proprieties of a document.</p> </div> <div data-ice="properties"> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-member-startTimer"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">startTimer</span><span class="code" data-ice="signature">: <span>Timer</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber36">source</a></span></span> </span> </h3> <div data-ice="description"><p>startimer A timer used for sending pings</p> </div> <div data-ice="properties"> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-member-viewEditor"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">viewEditor</span><span class="code" data-ice="signature">: <span>Quill</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber42">source</a></span></span> </span> </h3> <div data-ice="description"><p> ViewEditor the used editor, here it is Quill editor </p> </div> <div data-ice="properties"> </div> <div data-ice="see"><h4>See:</h4><ul><li><span><a href=" https://quilljs.com/"> https://quilljs.com/</a></span></li></ul></div> </div> </div> <div data-ice="methodDetails"><h2 data-ice="title">Public Methods</h2> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-UpdateComments"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">UpdateComments</span><span class="code" data-ice="signature">()</span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber555">source</a></span></span> </span> </h3> <div data-ice="description"><p>UpdateComments This function to extract the comments form the editor and show them in #comments</p> </div> <div data-ice="properties"> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-applyChanges"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">applyChanges</span><span class="code" data-ice="signature">(delta: <span>[type]</span>, iniRetain: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber225">source</a></span></span> </span> </h3> <div data-ice="description"><p>applyChanges Send delta object with attributes character by character starting from the position &quot;iniRetain&quot; ]</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">delta</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">iniRetain</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-atPing"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">atPing</span><span class="code" data-ice="signature">(origin: <span>[type]</span>, pseudo: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber537">source</a></span></span> </span> </h3> <div data-ice="description"><p>atPing at the reception of ping</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">origin</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">pseudo</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-changeTitle"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">changeTitle</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber499">source</a></span></span> </span> </h3> <div data-ice="description"><p>changeTitle For any change in title, broadcast the new title</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-cleanQuill"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">cleanQuill</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber463">source</a></span></span> </span> </h3> <div data-ice="description"><p>cleanQuill description</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-copyLink"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">copyLink</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber197">source</a></span></span> </span> </h3> <div data-ice="description"><p>copyLink copy the link of the document</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-loadDocument"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">loadDocument</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber111">source</a></span></span> </span> </h3> <div data-ice="description"><p>loadDocument load the document if it exist in the local storage</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-remoteCaretMoved"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">remoteCaretMoved</span><span class="code" data-ice="signature">(range: <span>[type]</span>, origin: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber445">source</a></span></span> </span> </h3> <div data-ice="description"><p>remoteCaretMoved At the reception of CARET position</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">range</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">origin</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-remoteInsert"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">remoteInsert</span><span class="code" data-ice="signature">(element: <span>[type]</span>, indexp: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber381">source</a></span></span> </span> </h3> <div data-ice="description"><p>remoteInsert At the reception of insert operation</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">element</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">indexp</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-remoteRemove"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">remoteRemove</span><span class="code" data-ice="signature">(index: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber429">source</a></span></span> </span> </h3> <div data-ice="description"><p>remoteRemove At the reception of remove operation</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">index</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-saveDocument"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">saveDocument</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber174">source</a></span></span> </span> </h3> <div data-ice="description"><p>saveDocument save the document in local storage</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-sendIt"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">sendIt</span><span class="code" data-ice="signature">(text: <span>[type]</span>, att: <span>[type]</span>, start: <span>[type]</span>, value: <span>[type]</span>, oper: <span>[type]</span>, retain: <span>[type]</span>, isItInsertWithAtt: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber272">source</a></span></span> </span> </h3> <div data-ice="description"><p>sendIt Send the changes character by character </p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">text</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">att</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">start</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">value</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">oper</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">retain</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">isItInsertWithAtt</td> <td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-startPing"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">startPing</span><span class="code" data-ice="signature">(interval: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber516">source</a></span></span> </span> </h3> <div data-ice="description"><p>startPing send periodically ping</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">interval</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> <div data-ice="todo"><h4>TODO:</h4><ul><li><span>TODO: Make interval as global parameter</span></li></ul></div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-stopPing"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">stopPing</span><span class="code" data-ice="signature">(): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber527">source</a></span></span> </span> </h3> <div data-ice="description"><p>stopPing stopPing</p> </div> <div data-ice="properties"> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> <div data-ice="todo"><h4>TODO:</h4><ul><li><span> implement this function</span></li></ul></div> </div> <div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="instance-method-textChange"> <span class="access" data-ice="access">public</span> <span class="code" data-ice="name">textChange</span><span class="code" data-ice="signature">(delta: <span>[type]</span>, oldDelta: <span>[type]</span>, source: <span>[type]</span>): <span>[type]</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/controller/editor.js.html#lineNumber211">source</a></span></span> </span> </h3> <div data-ice="description"><p>textChange description</p> </div> <div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</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">delta</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">oldDelta</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> <tr data-ice="property" data-depth="0"> <td data-ice="name" class="code" data-depth="0">source</td> <td data-ice="type" class="code"><span>[type]</span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>[description]</p> </td> </tr> </tbody> </table> </div> </div> <div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tbody> <tr> <td class="return-type code" data-ice="returnType"><span>[type]</span></td> <td class="return-desc" data-ice="returnDescription"><p>[description]</p> </td> </tr> </tbody> </table> <div data-ice="returnProperties"> </div> </div> <div data-ice="listenWrap"> <h4>Listen:</h4> <table> <tbody> <tr class="listen" data-ice="listen"> <td><p data-ice="listenName"><span>*</span></p></td> <td data-ice="listenDesc"><p>editor content changes</p> </td> </tr> </tbody> </table> </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>