}
private RtePlugin buildUndoPlugin(RichTextEditor rteAnnotation) {
if (rteAnnotation.undo().length > 0) {
Undo undoAnnotation = rteAnnotation.undo()[0];
List<String> features = new ArrayList<String>();
int maxUndoSteps = undoAnnotation.maxUndoSteps();
if (undoAnnotation.undo()) {
features.add("undo");
}
if (undoAnnotation.redo()) {
features.add("redo");
}
UndoRtePluginParameters undoParameters = new UndoRtePluginParameters();
undoParameters.setFeatures(convertFeatures(features));