I am currently trying to figure out a way to insert and also edit text within the ASPxRichText web control.
For the text edit, I would be doing this on the server side after loading the text with the Open() method. I believe this could be solved the same way as the text replacing from my previous ticket, if there is a way to access the document within the ASPxRichEdit control.
Any help would be greatly appreciated .
Starting with the 16.1 version, we have implemented a client-side API, which allows you to accomplish this task by using the built-in functionality and avoid using undocumented functions. Use the client-side ASPxClientRichEdit.commands.insertText property for this purpose:
Please see the Client Command API demo for more information about this new client-side functionality.
For earlier versions:
At present, the ASPxRichEdit control does not have a server-side interface for the underlying document. If necessary, you can load the document to the RichEditDocumentServer component, perform the required manipulations (insert/modify text ranges) and open the modified document in the ASPxRichEdit control (see ASPxRichEdit.Open). As for the client side, there is a non-public API for this purpose:
where "rich" is a value of the ASPxRichEdit.ClientInstanceName property. However, please note that all these commands are internal. So we can change them without warning.