implement set caption text command, add listener for undo and undolastaction method