A method for operating a terminal includes: receiving an input of a first gesture that indicates at least a partial area in a document displayed on the terminal; receiving an input of a second gesture that corresponds to a specific function; and performing the specific function with respect to contents of the document that are included in the at least the partial area in the document.