An electronic device, comprising: a display configured to display a text input window; and a processor configured to: detect an entity text among texts displayed on the text input window in response to characters input therein; control the display to display relevant information corresponding to the detected entity text in response to a first input selecting the entity text, the selected entity text being a search keyword for retrieving relevant information; generate and transmit a message which is text-based content in which the entity text and the retrieved relevant information are included as text and metadata respectively, wherein the retrieved relevant information is linked to the selected entity text in response to a second input selecting the retrieved relevant information; control, when text-based content is received from an external device through a communicator that includes an entity text linked to relevant information, the display to display the received entity text having the linked relevant information to be distinguished from other text; output the relevant information linked to the received entity text in response to a third input selecting the entity text; and execute a function or application corresponding to the relevant information selected in response to a fourth input selecting the relevant information. a display configured to display a text input window; and a processor configured to: detect an entity text among texts displayed on the text input window in response to characters input therein; control the display to display relevant information corresponding to the detected entity text in response to a first input selecting the entity text, the selected entity text being a search keyword for retrieving relevant information; generate and transmit a message which is text-based content in which the entity text and the retrieved relevant information are included as text and metadata respectively, wherein the retrieved relevant information is linked to the selected entity text in response to a second input selecting the retrieved relevant information; control, when text-based content is received from an external device through a communicator that includes an entity text linked to relevant information, the display to display the received entity text having the linked relevant information to be distinguished from other text; output the relevant information linked to the received entity text in response to a third input selecting the entity text; and execute a function or application corresponding to the relevant information selected in response to a fourth input selecting the relevant information. detect an entity text among texts displayed on the text input window in response to characters input therein; control the display to display relevant information corresponding to the detected entity text in response to a first input selecting the entity text, the selected entity text being a search keyword for retrieving relevant information; generate and transmit a message which is text-based content in which the entity text and the retrieved relevant information are included as text and metadata respectively, wherein the retrieved relevant information is linked to the selected entity text in response to a second input selecting the retrieved relevant information; control, when text-based content is received from an external device through a communicator that includes an entity text linked to relevant information, the display to display the received entity text having the linked relevant information to be distinguished from other text; output the relevant information linked to the received entity text in response to a third input selecting the entity text; and execute a function or application corresponding to the relevant information selected in response to a fourth input selecting the relevant information.