Code example for Editable

Methods: insert

0
			public void onClick(View v) {
				int position = Selection.getSelectionStart(DroidWriterEditText.this.getText());
 
				Spanned e = Html.fromHtml("<img src=\"" + imageResource + "\">", imageGetter, null);
 
				DroidWriterEditText.this.getText().insert(position, e);
			} 
		}); 
	} 
 
	public void setClearButton(View button) {
		button.setOnClickListener(new View.OnClickListener() {
			@Override 
			public void onClick(View v) {
				DroidWriterEditText.this.setText("");
			} 
		}); 
	} 
 
	private class DWTextWatcher implements TextWatcher {
		@Override