EditorEx () { EditorFactory editorFactory = EditorFactory.getInstance(); Document document = ((EditorFactoryImpl)editorFactory).createDocument(false); UndoUtil.disableUndoFor(document); return (EditorEx)createEditor(); }