EditorController
EditorController this the link between the core functions and the interface.
Constructor Summary
| Public Constructor | ||
| public |
constructor(model: [doc], sessionID: [string]) [constructor description] |
|
Member Summary
| Public Members | ||
| public |
markers contains all marks of the users: carets, avatars... |
|
| public |
model: [doc] this is the object that contains all proprieties of a document. |
|
| public |
startTimer: Timer startimer A timer used for sending pings |
|
| public |
viewEditor: Quill ViewEditor the used editor, here it is Quill editor |
|
Method Summary
| Public Methods | ||
| public |
UpdateComments This function to extract the comments form the editor and show them in #comments |
|
| public |
applyChanges(delta: [type], iniRetain: [type]): [type] applyChanges Send delta object with attributes character by character starting from the position "iniRetain" ] |
|
| public |
atPing(origin: [type], pseudo: [type]): [type] atPing at the reception of ping |
|
| public |
changeTitle(): [type] changeTitle For any change in title, broadcast the new title |
|
| public |
cleanQuill(): [type] cleanQuill description |
|
| public |
copyLink(): [type] copyLink copy the link of the document |
|
| public |
loadDocument(): [type] loadDocument load the document if it exist in the local storage |
|
| public |
remoteCaretMoved(range: [type], origin: [type]): [type] remoteCaretMoved At the reception of CARET position |
|
| public |
remoteInsert(element: [type], indexp: [type]): [type] remoteInsert At the reception of insert operation |
|
| public |
remoteRemove(index: [type]): [type] remoteRemove At the reception of remove operation |
|
| public |
saveDocument(): [type] saveDocument save the document in local storage |
|
| public |
sendIt(text: [type], att: [type], start: [type], value: [type], oper: [type], retain: [type], isItInsertWithAtt: Boolean): [type] sendIt Send the changes character by character |
|
| public |
startPing(interval: [type]): [type] startPing send periodically ping |
|
| public |
stopPing(): [type] stopPing stopPing |
|
| public |
textChange(delta: [type], oldDelta: [type], source: [type]): [type] textChange description |
|
Public Constructors
public constructor(model: [doc], sessionID: [string]) source
[constructor description]
Params:
| Name | Type | Attribute | Description |
| model | [doc] | this is the object that contains all proprieties of a document. |
|
| sessionID | [string] | [description] |
Public Members
Public Methods
public UpdateComments() source
UpdateComments This function to extract the comments form the editor and show them in #comments
public applyChanges(delta: [type], iniRetain: [type]): [type] source
applyChanges Send delta object with attributes character by character starting from the position "iniRetain" ]
Params:
| Name | Type | Attribute | Description |
| delta | [type] | [description] |
|
| iniRetain | [type] | [description] |
Return:
| [type] | [description] |
public atPing(origin: [type], pseudo: [type]): [type] source
atPing at the reception of ping
Params:
| Name | Type | Attribute | Description |
| origin | [type] | [description] |
|
| pseudo | [type] | [description] |
Return:
| [type] | [description] |
public changeTitle(): [type] source
changeTitle For any change in title, broadcast the new title
Return:
| [type] | [description] |
public copyLink(): [type] source
copyLink copy the link of the document
Return:
| [type] | [description] |
public loadDocument(): [type] source
loadDocument load the document if it exist in the local storage
Return:
| [type] | [description] |
public remoteCaretMoved(range: [type], origin: [type]): [type] source
remoteCaretMoved At the reception of CARET position
Params:
| Name | Type | Attribute | Description |
| range | [type] | [description] |
|
| origin | [type] | [description] |
Return:
| [type] | [description] |
public remoteInsert(element: [type], indexp: [type]): [type] source
remoteInsert At the reception of insert operation
Params:
| Name | Type | Attribute | Description |
| element | [type] | [description] |
|
| indexp | [type] | [description] |
Return:
| [type] | [description] |
public remoteRemove(index: [type]): [type] source
remoteRemove At the reception of remove operation
Params:
| Name | Type | Attribute | Description |
| index | [type] | [description] |
Return:
| [type] | [description] |
public saveDocument(): [type] source
saveDocument save the document in local storage
Return:
| [type] | [description] |
public sendIt(text: [type], att: [type], start: [type], value: [type], oper: [type], retain: [type], isItInsertWithAtt: Boolean): [type] source
sendIt Send the changes character by character
Params:
| Name | Type | Attribute | Description |
| text | [type] | [description] |
|
| att | [type] | [description] |
|
| start | [type] | [description] |
|
| value | [type] | [description] |
|
| oper | [type] | [description] |
|
| retain | [type] | [description] |
|
| isItInsertWithAtt | Boolean | [description] |
Return:
| [type] | [description] |
public startPing(interval: [type]): [type] source
startPing send periodically ping
Params:
| Name | Type | Attribute | Description |
| interval | [type] | [description] |
Return:
| [type] | [description] |
TODO:
- TODO: Make interval as global parameter
public stopPing(): [type] source
stopPing stopPing
Return:
| [type] | [description] |
TODO:
- implement this function
public textChange(delta: [type], oldDelta: [type], source: [type]): [type] source
textChange description
Params:
| Name | Type | Attribute | Description |
| delta | [type] | [description] |
|
| oldDelta | [type] | [description] |
|
| source | [type] | [description] |
Return:
| [type] | [description] |
Listen:
* |
editor content changes |
