Class: Word
| Defined in: | lib/Types/TextTypes.coffee | 
| Inherits: | types.ListManager | 
Overview
Handles a Word-like data structures with support for insertText/deleteText at a word-position.
Instance Method Summary
- # (Word) insertText(position, content) Inserts a string into the word.
 - # (Word) deleteText(position, length) Deletes a part of the word.
 - # (Word) replaceText(text) Replace the content of this word with another one.
 - # (String) val()
 - # (void) toString() Same as Word.val
 - # (void) setReplaceManager(op) Private In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order to provide replace functionality.
 - # (void) bind(textfield) Bind this Word to a textfield or input field.
 - # (void) _encode() Private Encode this operation in such a way that it can be parsed by remote peers.
 
Constructor Details
      #
(void)
constructor(uid, beginning, end, prev, next, origin)
      Private
      
    
Instance Method Details
      #
(Word)
insertText(position, content)
      
    
Inserts a string into the word.
      #
(Word)
deleteText(position, length)
      
    
Deletes a part of the word.
      #
(Word)
replaceText(text)
      
    
Replace the content of this word with another one. Concurrent replacements are not merged! Only one of the replacements will be used.
      #
(String)
val()
      
    
      #
(void)
toString()
      
    
Same as Word.val
      #
(void)
setReplaceManager(op)
      Private
      
    
In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order to provide replace functionality.
      #
(void)
bind(textfield)
      
    
Bind this Word to a textfield or input field.
Examples:
var textbox = document.getElementById("textfield");
yatta.bind(textbox);
  
      #
(void)
_encode()
      Private
      
    
Encode this operation in such a way that it can be parsed by remote peers.