The Eclipse Nebula RichTextEditor has an 'insertText' method that inserts a text string in the middle of the existing RichTextEditor text. It would be great to add this 'insertText' functionality to the RAP version of the Nebula RichTextEditor. I have attempted to get this working and will provide the code below:
/**
* Insert text to the editing area. Appends the text in the current cursor position
* Can contain HTML tags for styling.
*
* @param text The text to insert into the editing area.
*/
public void insertText( String text ) {
checkWidget();
if( text == null ) {
SWT.error( SWT.ERROR_NULL_ARGUMENT );
}
JsonObject parameters = new JsonObject()
.add( "text", text );
remoteObject.call( "insertText", parameters );
}
The Eclipse Nebula RichTextEditor has an 'insertText' method that inserts a text string in the middle of the existing RichTextEditor text. It would be great to add this 'insertText' functionality to the RAP version of the Nebula RichTextEditor. I have attempted to get this working and will provide the code below:
RichTextEditorHandler.js
RichTextEditor.js
RichTextEditor.java