How to make an element in a TinyMCE editor treated as a non-editable single item?

After trying about 100 different work arounds, we finally found a solution which works (for our needs anyway).

We're inserting a disabled button with all the styles removed. For example,

<input type="button" class="token" value="my token" disabled="disabled" />

And then adding some code to onGetContent() to convert the input to plain text.

This solution, although not very elegant,

  1. Makes the token behave as a single character/item.
  2. Makes it read only.
  3. Is dynamic in the context of the editor so we can display our token text.

Edit: This is what we ended up with.

enter image description here