Any ideas on inserting tags at the cursor position with such a method??
I can use the richtextbox.selectedRTF property to change the font, and input tags such as "//super " (superscript) and so on, which works great.
e.g.
"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang5129{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\r\n\\uc1\\pard\\fs24 Some Selected Text!}\r\n"
*INSERT SUPERSCRIPT TAG*
"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang5129{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\r\n\\uc1\\pard\\super\\fs24 Some Selected Text!}\r\n"
However, if no text is highlighted, I have no way of inserting formatting at the caret position, because the selectedRTF looks something like this:
"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang5129\\uc1 }\r\n"
if you pressed the 'superscript' button, you'd expect to be able to type in superscript, even if nothing around was selected.
Any ideas on inserting tags at the cursor position??
Tearing my hair out here :s