italicAction = new ItalicAction();
strikethroughAction = new StrikethroughAction();
headingAction = new HeadingAction();
getDocument().addUndoableEditListener(new UndoableEditListener() {
@Override
public void undoableEditHappened(UndoableEditEvent e) {
undoManager.addEdit(e.getEdit());
undoAction.updateUndoState();
redoAction.updateRedoState();