title: Is it possible to use a custom object instead of String inside a Tkinter Text Widget (python)?
body: <p>I'm trying to create a text editor that will manipulate a string like object.  Ideally I would like to subclass Tkinter's Text Widget or some other Gui module to allow me to substitute this custom object instead of using strings.</p>
  
  <p>I understand how to create the object itself (which essentially just tags every word with meta-data), but not how to manipulate the rendered object as text while retaining its other attributes.</p>
  
  <p>Eg.<br>
  The text editor imports a file that contains "Hello World".  Upon opening this text, both words are tag'd with relevant attributes.  (Displayed below as a dictionary, but ideally an object Hello.strContent, Hello.index, etc.)</p>
  
  <pre><code>Hello={strContent: "Hello", index: 0, speaker: "Joe", paragraph: 3}
  World={strContent: "World", index: 1, speaker: "Joe", paragraph: 3}
  </code></pre>
  
  <p>Now I'm completely stumped though how I could make these string like objects manipulable, and subject to cutting, copying, pasting, deleting, and rearranging, inside a Text gui.  I would not need to have the program allow me to type any new words or create new objects, just manipulate the objects that have been initialized upon converting the file I opened.</p>
  
  <p>Any help or direction would be greatly appreciated.  Thanks.</p>