We'd like to achieve to replace defined keywords with html (text). we are able to insert at the caret position the html. But we have difficulties to remove the typed keyword. We've tried to simulate the backspace key triggerd by jQuery but it didn't work out well. We've tried to get the value from the editor and use the carrot position to remove/update the keyword. The caret position is related to the plain text value instead of the html value. With an existing html formatted text it fails. but we cannot use a regex replace because we dot not want to alter the text typed before.
A dojo: http://dojo.telerik.com/igabu/12
type 'test' press space and the keyword should be replaced by the given value. (item).
Possible solutions would be:
- remove last X typed characters. / trigger backspace.
- remove X characters from caret position (related to html value)
- ... ?
Any help is appreciated!